@commercelayer/sdk 6.0.0-beta.8 → 6.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.mjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/debug.ts","../src/fetch.ts","../src/error.ts","../src/config.ts","../src/client.ts","../src/common.ts","../src/jsonapi.ts","../src/query.ts","../src/resource.ts","../src/resources/addresses.ts","../src/resources/adjustments.ts","../src/resources/adyen_gateways.ts","../src/resources/adyen_payments.ts","../src/resources/application.ts","../src/resources/attachments.ts","../src/resources/authorizations.ts","../src/resources/avalara_accounts.ts","../src/resources/axerve_gateways.ts","../src/resources/axerve_payments.ts","../src/resources/billing_info_validation_rules.ts","../src/resources/bing_geocoders.ts","../src/resources/braintree_gateways.ts","../src/resources/braintree_payments.ts","../src/resources/bundles.ts","../src/resources/buy_x_pay_y_promotions.ts","../src/resources/captures.ts","../src/resources/carrier_accounts.ts","../src/resources/checkout_com_gateways.ts","../src/resources/checkout_com_payments.ts","../src/resources/cleanups.ts","../src/resources/coupon_codes_promotion_rules.ts","../src/resources/coupon_recipients.ts","../src/resources/coupons.ts","../src/resources/custom_promotion_rules.ts","../src/resources/customer_addresses.ts","../src/resources/customer_groups.ts","../src/resources/customer_password_resets.ts","../src/resources/customer_payment_sources.ts","../src/resources/customer_subscriptions.ts","../src/resources/customers.ts","../src/resources/delivery_lead_times.ts","../src/resources/event_callbacks.ts","../src/resources/events.ts","../src/resources/exports.ts","../src/resources/external_gateways.ts","../src/resources/external_payments.ts","../src/resources/external_promotions.ts","../src/resources/external_tax_calculators.ts","../src/resources/fixed_amount_promotions.ts","../src/resources/fixed_price_promotions.ts","../src/resources/free_gift_promotions.ts","../src/resources/free_shipping_promotions.ts","../src/resources/geocoders.ts","../src/resources/gift_card_recipients.ts","../src/resources/gift_cards.ts","../src/resources/google_geocoders.ts","../src/resources/imports.ts","../src/resources/in_stock_subscriptions.ts","../src/resources/inventory_models.ts","../src/resources/inventory_return_locations.ts","../src/resources/inventory_stock_locations.ts","../src/resources/klarna_gateways.ts","../src/resources/klarna_payments.ts","../src/resources/line_item_options.ts","../src/resources/line_items.ts","../src/resources/manual_gateways.ts","../src/resources/manual_tax_calculators.ts","../src/resources/markets.ts","../src/resources/merchants.ts","../src/resources/order_amount_promotion_rules.ts","../src/resources/order_copies.ts","../src/resources/order_factories.ts","../src/resources/order_subscription_items.ts","../src/resources/order_subscriptions.ts","../src/resources/order_validation_rules.ts","../src/resources/orders.ts","../src/resources/organization.ts","../src/resources/packages.ts","../src/resources/parcel_line_items.ts","../src/resources/parcels.ts","../src/resources/payment_gateways.ts","../src/resources/payment_methods.ts","../src/resources/payment_options.ts","../src/resources/paypal_gateways.ts","../src/resources/paypal_payments.ts","../src/resources/percentage_discount_promotions.ts","../src/resources/price_frequency_tiers.ts","../src/resources/price_lists.ts","../src/resources/price_tiers.ts","../src/resources/price_volume_tiers.ts","../src/resources/prices.ts","../src/resources/promotion_rules.ts","../src/resources/promotions.ts","../src/resources/recurring_order_copies.ts","../src/resources/refunds.ts","../src/resources/reserved_stocks.ts","../src/resources/resource_errors.ts","../src/resources/return_line_items.ts","../src/resources/returns.ts","../src/resources/satispay_gateways.ts","../src/resources/satispay_payments.ts","../src/resources/shipments.ts","../src/resources/shipping_categories.ts","../src/resources/shipping_method_tiers.ts","../src/resources/shipping_methods.ts","../src/resources/shipping_weight_tiers.ts","../src/resources/shipping_zones.ts","../src/resources/sku_list_items.ts","../src/resources/sku_list_promotion_rules.ts","../src/resources/sku_lists.ts","../src/resources/sku_options.ts","../src/resources/skus.ts","../src/resources/stock_items.ts","../src/resources/stock_line_items.ts","../src/resources/stock_locations.ts","../src/resources/stock_reservations.ts","../src/resources/stock_transfers.ts","../src/resources/stripe_gateways.ts","../src/resources/stripe_payments.ts","../src/resources/subscription_models.ts","../src/resources/tags.ts","../src/resources/tax_calculators.ts","../src/resources/tax_categories.ts","../src/resources/tax_rules.ts","../src/resources/taxjar_accounts.ts","../src/resources/transactions.ts","../src/resources/versions.ts","../src/resources/voids.ts","../src/resources/webhooks.ts","../src/resources/wire_transfers.ts","../src/api.ts","../src/static.ts","../src/commercelayer.ts"],"sourcesContent":["\ntype Debugger = (pattern: string, ...args: any[]) => void\n\ntype DebuggerFactory = (namespace: string) => Debugger\n\n\n/* Nope debugger */\nconst debuggerFunction = (_pattern: string, ..._args: any[]): void => {\n\t// console.log(_pattern)\n}\n\nlet debuggerFactory: DebuggerFactory = (_namespace: string): Debugger => debuggerFunction\n\n\n/* Try loading 'debug' module */\ntry {\n\tconst debugModule = require('debug')\n\tif (debugModule && (typeof debugModule === 'function')) debuggerFactory = debugModule\n} catch (error) {\n\t//\n}\n\n\nconst debugPrefix = 'clsdk'\n\n\n/* Retrieve the name of the caller 'module' */\n/*\nconst caller = (): string => {\n\n\tconst err = new Error()\n\n\tError.prepareStackTrace = (_, stack) => stack\n\tconst stack = err.stack as unknown as NodeJS.CallSite[]\n\tError.prepareStackTrace = undefined\n\n\tconst fileName = stack[2].getFileName() || '/'\n\n\treturn fileName.replace(/^.*[\\\\/]/, '').replace('.ts', '')\n\n}\n*/\n\n\n/* Return a debugger for the defined namespace */\nconst debug = (namespace: string): Debugger => {\n\treturn debuggerFactory(`${debugPrefix}:${namespace}`)\n}\n\n\nexport default debug\n","\nimport type { DocWithData } from 'jsonapi-typescript'\nimport type { InterceptorManager } from './interceptor'\n\n\nimport Debug from './debug'\nconst debug = Debug('fetch')\n\n\nexport type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>\n\nexport type FetchResponse = DocWithData\nexport type FetchRequestOptions = RequestInit\nexport type FetchClientOptions = {\n interceptors?: InterceptorManager,\n fetch?: Fetch\n}\n\n\nexport class FetchError extends Error {\n\n static isFetchError = (error: any): error is FetchError => {\n return error instanceof FetchError\n }\n\n readonly #errors?: any[]\n readonly #status: number\n readonly #statusText: string\n\n constructor(status: number, statusText: string, body?: any) {\n super(statusText)\n this.#status = status\n this.#statusText = statusText\n if (body) this.#errors = body.errors\n }\n\n\n get errors(): any[] | undefined { return this.#errors }\n\n get status(): number { return this.#status }\n\n get statusText(): string { return this.#statusText }\n\n}\n\n\n\nexport const fetchURL = async (url: URL, requestOptions: FetchRequestOptions, clientOptions?: FetchClientOptions): Promise<FetchResponse> => {\n\n debug('fetch: %s, %O, native[%s]', url, requestOptions || {}, (clientOptions?.fetch? 'no' : 'yes'))\n\n const interceptors = clientOptions?.interceptors\n\n if (interceptors?.request?.onSuccess) ( { url, options: requestOptions } = await interceptors.request.onSuccess({ url, options: requestOptions }) )\n\n // const request: Request = new Request(url, requestOptions)\n\n const fetchClient = clientOptions?.fetch || fetch\n\n let response = await fetchClient(url, requestOptions)\n\n if (response.ok) {\n if (interceptors?.rawReader?.onSuccess) await interceptors.rawReader.onSuccess(response)\n if (interceptors?.response?.onSuccess) response = await interceptors.response.onSuccess(response)\n } else {\n if (interceptors?.rawReader?.onFailure) await interceptors.rawReader.onFailure(response)\n }\n\n const responseBody = await response.json().catch(() => {})\n\n if (!response.ok) {\n let error = new FetchError(response.status, response.statusText, responseBody)\n if (interceptors?.response?.onFailure) error = await interceptors.response.onFailure(error)\n if (error) throw error\n }\n\n return responseBody\n\n}","import { FetchError } from './fetch'\n\n\nenum ErrorType {\n\n\tCLIENT = 'client',\t\t // Generic Client error\n\tREQUEST = 'request',\t\t// Error preparing API request\n\tRESPONSE = 'response',\t// Error response from API\n\tCANCEL = 'cancel',\t\t // Forced request abort using interceptor\n\tPARSE = 'parse',\t\t // Error parsing API resource\n TIMEOUT = 'timeout' // Timeout error\n}\n\n\nclass SdkError extends Error {\n\n\tstatic NAME = 'SdkError'\n\n\tstatic isSdkError(error: any): error is SdkError {\n\t\treturn error && [SdkError.NAME, ApiError.NAME].includes(error.name as string) && Object.values(ErrorType).includes(error.type as ErrorType)\n\t}\n\n\ttype: ErrorType\n\tcode?: string\n\tsource?: Error\n\n\tconstructor(error: { message: string, type?: ErrorType }) {\n\t\tsuper(error.message)\n\t\tthis.name = SdkError.NAME\n\t\tthis.type = error.type || ErrorType.CLIENT\n\t}\n\n}\n\nclass ApiError extends SdkError {\n\n\tstatic NAME = 'ApiError'\n\n\tstatic isApiError(error: any): error is ApiError {\n\t\treturn SdkError.isSdkError(error) && (error.name === ApiError.NAME) && (error.type === ErrorType.RESPONSE)\n\t}\n\n\terrors: any[] = []\n\tstatus?: number\n\tstatusText?: string\n\n\tconstructor(error: SdkError)\n\tconstructor(error: { message: string }) {\n\t\tsuper({ ...error, type: ErrorType.RESPONSE })\n\t\tthis.name = ApiError.NAME\n\t}\n\n\tfirst(): any {\n\t\treturn (this.errors?.length > 0) ? this.errors[0] : undefined\n\t}\n\n}\n\n\nconst isRequestError = (error: any): error is TypeError => {\n\treturn error instanceof TypeError\n}\n\nconst isCancelError = (error: any): boolean => {\n\treturn (error instanceof DOMException) && (error.name === 'AbortError')\n}\n\nconst isTimeoutError = (error: any): boolean => {\n\treturn (error instanceof DOMException) && (error.name === 'TimeoutError')\n}\n\n\nconst handleError = (error: Error): never => {\n\n\tlet sdkError = new SdkError({ message: error.message })\n\n\tif (FetchError.isFetchError(error)) {\n // console.log('********** FetchError')\n\t\tconst apiError = new ApiError(sdkError)\n\t\tapiError.type = ErrorType.RESPONSE\n\t\tapiError.status = error.status\n\t\tapiError.statusText = error.statusText\n\t\tapiError.code = String(apiError.status)\n\t\tapiError.errors = error.errors || []\n\t\tif (!apiError.message && apiError.statusText) apiError.message = apiError.statusText\n\t\tsdkError = apiError\n\t}\n\telse if (isRequestError(error)) {\n // console.log('********** RequestError')\n sdkError.type = ErrorType.REQUEST\n }\n\telse if (isCancelError(error)) {\n // console.log('********** CancelError')\n sdkError.type = ErrorType.CANCEL\n }\n else if (isTimeoutError(error)) {\n // console.log('********** TimeoutError')\n sdkError.type = ErrorType.TIMEOUT\n }\n\telse {\n // console.log('********** ClientError')\n\t\tsdkError.type = ErrorType.CLIENT\n\t\tsdkError.source = error\n\t}\n\n\tthrow sdkError\n\n}\n\n\nexport { SdkError, ApiError, ErrorType, handleError }\n","// export type ApiMode = 'test' | 'live'\n\n\nconst config = {\n\tdefault: {\n\t\t// environment: 'test',\n\t\tdomain: 'commercelayer.io',\n\t\tpageNumber: 1,\n\t\tpageSize: 10,\n\t},\n\tclient: {\n\t\ttimeout: 15000,\n\t\trequiredAttributes: ['organization', 'accessToken'],\n\t},\n\tjsonapi: {\n\t\tmaxResourceIncluded: 2\n\t}\n} as const\n\n\nexport default config\n","import { SdkError, handleError } from './error'\nimport type { InterceptorManager } from './interceptor'\nimport config from './config'\nimport type { FetchResponse, FetchRequestOptions, FetchClientOptions, Fetch } from './fetch'\nimport { fetchURL } from './fetch'\n\n\nimport Debug from './debug'\nconst debug = Debug('client')\n\n\n\nconst baseURL = (organization: string, domain?: string): string => {\n\treturn `https://${organization.toLowerCase()}.${domain || config.default.domain}/api`\n}\n\n\ntype RequestParams = Record<string, string | number | boolean>\ntype RequestHeaders = Record<string, string>\n\n\ntype RequestConfig = {\n\ttimeout?: number\n\tparams?: RequestParams\n\theaders?: RequestHeaders\n\tuserAgent?: string\n\tfetch?: Fetch\n}\n\n\ntype ApiConfig = {\n\torganization: string\n\tdomain?: string\n\taccessToken: string\n}\n\ntype ApiClientInitConfig = ApiConfig & RequestConfig\ntype ApiClientConfig = Partial<ApiClientInitConfig>\n\n\nexport type Method = 'GET' | 'DELETE' | 'POST' | 'PUT' | 'PATCH'\n\n\n\nclass ApiClient {\n\n\tstatic create(options: ApiClientInitConfig): ApiClient {\n\t\tfor (const attr of config.client.requiredAttributes)\n\t\t\tif (!options || !options[attr as keyof ApiClientInitConfig]) throw new SdkError({ message: `Undefined '${attr}' parameter` })\n\t\treturn new ApiClient(options)\n\t}\n\n\n\t#baseUrl: string\n\t#accessToken: string\n\treadonly #clientConfig: RequestConfig\n\treadonly #interceptors: InterceptorManager\n\n\n\tprivate constructor(options: ApiClientInitConfig) {\n\n\t\tdebug('new client instance %O', options)\n\n\t\tthis.#baseUrl = baseURL(options.organization, options.domain)\n\t\tthis.#accessToken = options.accessToken\n\n\t\tconst fetchConfig: RequestConfig = {\n\t\t\ttimeout: options.timeout || config.client.timeout,\n\t\t\t// httpAgent: options.httpAgent,\n\t\t\t// httpsAgent: options.httpsAgent\n\t\t}\n\n\t\t// Set custom headers\n\t\tconst customHeaders = this.customHeaders(options.headers)\n\n\t\t// Set headers\n\t\tconst headers: RequestHeaders = {\n\t\t\t...customHeaders,\n\t\t\t'Accept': 'application/vnd.api+json',\n\t\t\t'Content-Type': 'application/vnd.api+json',\n\t\t\t'Authorization': 'Bearer ' + this.#accessToken\n\t\t}\n\n\t\t// Set User-Agent\n\t\tconst userAgent = options.userAgent\n\t\tif (userAgent) headers['User-Agent'] = userAgent\n\n\t\tfetchConfig.headers = headers\n\n\t\tthis.#clientConfig = fetchConfig\n\n\t\tdebug('fetch config: %O', fetchConfig)\n\n\t\t// Interceptors\n\t\tthis.#interceptors = {}\n\n\t}\n\n\n\tget interceptors(): InterceptorManager { return this.#interceptors }\n\n\tget requestHeaders(): RequestHeaders {\n\t\tif (!this.#clientConfig.headers) this.#clientConfig.headers = {}\n\t\treturn this.#clientConfig.headers\n\t}\n\n\n\t/*\n\tset requestHeaders(headers: RequestHeaders) {\n\t\tthis.#clientConfig.headers = { ...this.#clientConfig.headers, ...headers }\n\t}\n\t*/\n\n\n\tconfig(config: ApiClientConfig): this {\n\n\t\tdebug('config %o', config)\n\n\t\tconst def = this.#clientConfig\n\t\tif (!def.headers) def.headers = {}\n\n\t\t// Client config\n\t\tif (config.timeout) def.timeout = config.timeout\n\t\t// if (config.httpAgent) def.httpAgent = config.httpAgent\n\t\t// if (config.httpsAgent) def.httpsAgent = config.httpsAgent\n\n\t\tif (config.userAgent) this.userAgent(config.userAgent)\n\t\tif (config.fetch) this.#clientConfig.fetch = config.fetch\n\n\t\t// API Client config\n\t\tif (config.organization) this.#baseUrl = baseURL(config.organization, config.domain)\n\t\tif (config.accessToken) {\n\t\t\tthis.#accessToken = config.accessToken\n\t\t\tdef.headers.Authorization = 'Bearer ' + this.#accessToken\n\t\t}\n\t\tif (config.headers) def.headers = { ...def.headers, ...this.customHeaders(config.headers) }\n\n\t\treturn this\n\n\t}\n\n\n\tuserAgent(userAgent: string): this {\n\t\tif (userAgent) this.requestHeaders['User-Agent'] = userAgent\n\t\treturn this\n\t}\n\n\n\tasync request(method: Method, path: string, body?: any, options?: ApiClientConfig): Promise<FetchResponse> {\n\n\t\tdebug('request %s %s, %O, %O', method, path, body || {}, options || {})\n\n\t\t// Ignored params (in debug mode)\n\t\tif (options?.userAgent) debug('User-Agent header ignored in request config')\n\n\t\t// URL\n\t\tconst baseUrl = options?.organization ? baseURL(options.organization, options.domain) : this.#baseUrl\n\t\tconst url = new URL(`${baseUrl}/${path}`)\n\n\t\t// Body\n\t\tconst bodyData = body ? JSON.stringify({ data: body }) : undefined\n\n\t\t// Headers\n\t\tconst headers = { ...this.requestHeaders, ...this.customHeaders(options?.headers) }\n\n\t\t// Access token\n\t\tconst accessToken = options?.accessToken || this.#accessToken\n\t\tif (accessToken) headers.Authorization = 'Bearer ' + accessToken\n\n\t\tconst requestOptions: FetchRequestOptions = { method, body: bodyData, headers }\n\n\t\t// Timeout\n\t\tconst timeout = options?.timeout || this.#clientConfig.timeout\n\t\tif (timeout) requestOptions.signal = AbortSignal.timeout(timeout)\n\n\t\tif (options?.params) Object.entries(options?.params).forEach(([name, value]) => { url.searchParams.append(name, String(value)) })\n\n\t\tconst clientOptions: FetchClientOptions = {\n\t\t\tinterceptors: this.interceptors,\n\t\t\tfetch: options?.fetch || this.#clientConfig.fetch\n\t\t}\n\n\t\t// const start = Date.now()\n\t\treturn await fetchURL(url, requestOptions, clientOptions)\n\t\t\t.catch((error: Error) => handleError(error))\n\t\t// .finally(() => { console.log(`<<-- ${method} ${path} ${Date.now() - start}`) })\n\n\t}\n\n\n\tprivate customHeaders(headers?: RequestHeaders): RequestHeaders {\n\t\tconst customHeaders: RequestHeaders = {}\n\t\tif (headers) {\n\t\t\tfor (const [name, value] of Object.entries(headers))\n\t\t\t\tif (!['accept', 'content-type', 'authorization', 'user-agent'].includes(name.toLowerCase())) customHeaders[name] = value\n\t\t}\n\t\treturn customHeaders\n\t}\n\n\n\t/*\n\tget currentAccessToken(): string {\n\t\treturn this.#accessToken\n\t}\n\t*/\n\n}\n\n\n\nexport default ApiClient\n\nexport type { ApiClientInitConfig, ApiClientConfig, RequestConfig }\n","\nimport { type ResourceTypeLock, resourceList } from './api'\nimport type { ResourceId, ResourceType } from './resource'\n\nconst isResourceId = (resource: any): resource is ResourceId => {\n\treturn (resource?.type && resource.id) && resourceList.includes(resource.type as ResourceTypeLock)\n}\n\nconst isResourceType = (resource: any): resource is ResourceType => {\n\treturn resource && (typeof resource.type !== 'undefined') && resource.type && resourceList.includes(resource.type as ResourceTypeLock)\n}\n\n\nexport { isResourceId, isResourceType }\n","\nimport type { Value as JSONValue } from 'json-typescript'\nimport type { DocWithData, Included, ResourceIdentifierObject, ResourceObject as JSONAPIObject, AttributesObject, RelationshipsObject } from 'jsonapi-typescript'\nimport type { ResourceCreate, ResourceUpdate, ResourceId, ResourceType, Resource, ResourceRel } from './resource'\nimport { isResourceId, isResourceType } from './common'\nimport config from './config'\n\nimport Debug from './debug'\nconst debug = Debug('jsonapi')\n\nexport type { DocWithData }\n\n\n\n// DENORMALIZATION\n\nconst denormalize = <R extends Resource>(response: DocWithData): R | R[] => {\n\n\tlet denormalizedResponse\n\n\tif (response.links) delete response.links\n\n\tconst data = response.data\n\tconst included = response.included\n\n\tif (!data) denormalizedResponse = data\n\telse {\n\t\tif (Array.isArray(data)) denormalizedResponse = data.map(res => denormalizeResource<R>(res, included))\n\t\telse denormalizedResponse = denormalizeResource<R>(data, included)\n\t}\n\n\treturn denormalizedResponse\n\n}\n\n\nconst findIncluded = (rel: ResourceIdentifierObject, included: Included = []): JSONAPIObject | undefined => {\n\tconst inc = included.find(inc => {\n\t\treturn (rel.id === inc.id) && (rel.type === inc.type)\n\t})\n\treturn inc || rel\n}\n\n\nconst denormalizeResource = <T extends ResourceType>(res: any, included?: Included, chain: ResourceIdentifierObject[] = []): T => {\n\n\tdebug('denormalize resource: %O, %o', res, included || {})\n\n\tif (!res) return res\n\n\tconst resource = {\n\t\tid: res.id,\n\t\ttype: res.type,\n\t\t...res.attributes,\n\t}\n\n\tif (res.relationships) Object.keys(res.relationships as object).forEach(key => {\n\t\tconst rel: ResourceIdentifierObject = res.relationships[key].data\n\t\tif (rel) {\n\t\t\tif (chain.filter(r => (r.id === rel.id) && (r.type === rel.type)).length >= config.jsonapi.maxResourceIncluded) resource[key] = rel\n\t\t\telse {\n\t\t\t\tif (Array.isArray(rel)) resource[key] = rel.map((r: ResourceIdentifierObject) => denormalizeResource<ResourceType>(findIncluded(r, included), included, [...chain, r]))\n\t\t\t\telse resource[key] = denormalizeResource<ResourceType>(findIncluded(rel, included), included, [...chain, rel])\n\t\t\t}\n\t\t} else if (rel === null) resource[key] = null\n\t})\n\n\tdebug('denormalized resource: %O', resource)\n\n\treturn resource\n\n}\n\n\n// NORMALIZATION\n\nconst normalize = (resource: (ResourceCreate & ResourceType) | (ResourceUpdate & ResourceId)): JSONAPIObject => {\n\n\tdebug('normalize resource: %O', resource)\n\n\tconst attributes: AttributesObject = {}\n\tconst relationships: RelationshipsObject = {}\n\n\tfor (const field in resource) {\n\t\tif (['type', 'id'].includes(field)) continue\n\t\tconst value = resource[field as keyof (ResourceCreate | ResourceUpdate)]\n\t\tif (Array.isArray(value) && (value.length === 1) && isResourceType(value[0]) && ((value[0] as ResourceRel).id === null)) {\n\t\t\trelationships[field] = { data: [] }\n\t\t}\n\t\telse\n\t\tif (value && isResourceType(value) && ((value as ResourceRel).id === null)) {\n\t\t\trelationships[field] = { data: null }\n\t\t}\n\t\telse\n\t\tif (value && (isResourceId(value) || (Array.isArray(value) && isResourceId(value[0])))) {\n\t\t\trelationships[field] = { data: value as ResourceIdentifierObject }\n\t\t}\n\t\telse attributes[field] = value as JSONValue\n\t}\n\n\tconst normalized: JSONAPIObject = {\n\t\ttype: resource.type,\n\t\tattributes,\n\t\trelationships\n\t}\n\n\tif (isResourceId(resource)) normalized.id = resource.id\n\n\tdebug('normalized resource: %O', normalized)\n\n\treturn normalized\n\n}\n\n\n\nexport { denormalize, normalize }\n","\nimport type { Resource, ResourceType } from \"./resource\"\nimport { ErrorType, SdkError } from \"./error\"\nimport type { PositiveNumberRange, StringKey } from \"./types\"\nimport type { ResourceFields, ResourceSortFields, ResourceTypeLock } from \"./api\"\n\nimport Debug from './debug'\nconst debug = Debug('query')\n\n\nconst arrayFilters = ['_any', '_all', '_in']\nconst objectFilters = ['_jcont']\n\n// type QueryResType<T> = T extends { type: infer Type } ? Type : never\ntype QueryResType<T extends Resource> = T['type']\n\ntype QueryInclude = string[]\ntype QueryResourceFields<R extends ResourceTypeLock> = keyof ResourceFields[R]\ntype QueryArrayFields<R extends Resource> = Array<QueryResourceFields<QueryResType<R>>>\ntype QueryRecordFields = { [key in keyof ResourceFields]?: Array<(QueryResourceFields<key>)> }\n\ninterface QueryParamsRetrieve<R extends Resource = Resource> {\n\tinclude?: QueryInclude\n\tfields?: QueryArrayFields<R> | QueryRecordFields\n}\n\ntype QuerySortType = 'asc' | 'desc'\ntype QueryResourceSortable<R extends Resource> = ResourceSortFields[QueryResType<R>]\ntype QueryResourceSortableFields<R extends Resource> = StringKey<QueryResourceSortable<R>>\ntype QueryArraySortable<R extends Resource> = Array<QueryResourceSortableFields<R> | `-${QueryResourceSortableFields<R>}`>\ntype QueryRecordSortable<R extends Resource> = Partial<Record<keyof QueryResourceSortable<R>, QuerySortType>>\ntype QueryFilter = Record<string, string | number | boolean | object | Array<string | number>>\ntype QueryPageNumber = number\ntype QueryPageSize = PositiveNumberRange<25>\n\ninterface QueryParamsList<R extends Resource = Resource> extends QueryParamsRetrieve<R> {\n\tsort?: QueryArraySortable<R> | QueryRecordSortable<R>\n\tfilters?: QueryFilter\n\tpageNumber?: QueryPageNumber\n\tpageSize?: QueryPageSize\n}\n\ntype QueryParams<R extends Resource> = QueryParamsRetrieve<R> | QueryParamsList<R>\n\nexport type { QueryParamsRetrieve, QueryParamsList, QueryParams, QueryFilter }\n\n\n\nconst isParamsList = <R extends Resource>(params: any): params is QueryParamsList<R> => {\n\treturn params && (params.filters || params.pageNumber || params.pageSize || params.sort)\n}\n\n\ntype QueryStringParams = Record<string, string>\n\nconst generateQueryStringParams = <R extends Resource>(params: QueryParams<R> | undefined, res: string | ResourceType): QueryStringParams => {\n\n\tdebug('generate query string params: %O, %O', params, res)\n\n\tconst qp: QueryStringParams = {}\n\tif (!params) return qp\n\n\t// Include\n\tif (params.include) qp.include = params.include.join(',')\n\t// Fields\n\tif (params.fields) {\n\t\tif (Array.isArray(params.fields)) params.fields = { [(res as ResourceType).type || res]: params.fields }\n\t\tObject.entries(params.fields).forEach(([p, v]) => {\n\t\t\tqp[`fields[${p}]`] = v.join(',')\n\t\t})\n\t}\n\n\tif (isParamsList(params)) {\n\t\t// Sort\n\t\tif (params.sort) {\n\t\t\tif (Array.isArray(params.sort)) qp.sort = params.sort.join(',')\n\t\t\telse qp.sort = Object.entries(params.sort).map(([k, v]) => `${v === 'desc' ? '-' : ''}${k}`).join(',')\n\t\t}\n\t\t// Page\n\t\tif (params.pageNumber) qp['page[number]'] = String(params.pageNumber)\n\t\tif (params.pageSize) qp['page[size]'] = String(params.pageSize)\n\t\t// Filters\n\t\tif (params.filters) {\n\t\t\tObject.entries(params.filters).forEach(([p, v]) => {\n\t\t\t\tconst filter = p.substring(p.lastIndexOf('_'))\n\t\t\t\tlet val\n\t\t\t\tif (Array.isArray(v)) {\n\t\t\t\t\tif (!arrayFilters.includes(filter)) throw new SdkError({ message: `Wrong ${filter} filter: Array value is supported only for the following filters: ${arrayFilters.join(', ')}`, type: ErrorType.REQUEST })\n\t\t\t\t\tval = v.join(',')\n\t\t\t\t}\n\t\t\t\telse if (typeof v === 'object') {\n\t\t\t\t\tif (!objectFilters.includes(filter)) throw new SdkError({ message: `Wrong ${filter} filter: Object value is supported only for the following filters: ${objectFilters.join(', ')}`, type: ErrorType.REQUEST })\n\t\t\t\t\tval = JSON.stringify(v)\n\t\t\t\t}\n\t\t\t\telse val = String(v)\n\t\t\t\tqp[`filter[q][${p}]`] = val\n\t\t\t})\n\t\t}\n\t}\n\n\tdebug('query string params: %O', qp)\n\n\treturn qp\n\n}\n\n\nconst generateSearchString = (params?: QueryStringParams, questionMark: boolean = true): string => {\n\tif (!params || (Object.keys(params).length === 0)) return ''\n\treturn `${questionMark ? '?' : ''}${Object.entries(params).map(([key, val]) => `${key}=${String(val)}`).join('&')}`\n}\n\n\nexport { generateQueryStringParams, isParamsList, generateSearchString }\n","\nimport ApiClient, { type ApiClientInitConfig } from './client'\nimport { denormalize, normalize, type DocWithData } from './jsonapi'\nimport type { QueryParamsRetrieve, QueryParamsList, QueryFilter, QueryParams } from './query'\nimport { generateQueryStringParams, isParamsList } from './query'\nimport type { ResourceTypeLock } from './api'\nimport config from './config'\n\n\nimport Debug from './debug'\nconst debug = Debug('resource')\n\n\n\ntype ResourceNull = { id: null } & ResourceType\ntype ResourceRel = ResourceId | ResourceNull\n\n\ntype Metadata = Record<string, any>\n\n\ninterface ResourceType {\n\treadonly type: ResourceTypeLock\n}\n\n\ninterface ResourceId extends ResourceType {\n\treadonly id: string\n}\n\n\ninterface ResourceBase {\n\treference?: string | null\n\treference_origin?: string | null\n\tmetadata?: Metadata\n}\n\n\ninterface Resource extends ResourceBase, ResourceId {\n\treadonly created_at: string\n\treadonly updated_at: string\n}\n\n\ninterface ResourceCreate extends ResourceBase {\n\n}\n\n\ninterface ResourceUpdate extends ResourceBase {\n\treadonly id: string\n}\n\n\ntype ListMeta = {\n\treadonly pageCount: number\n\treadonly recordCount: number\n\treadonly currentPage: number\n\treadonly recordsPerPage: number\n}\n\n\nclass ListResponse<R> extends Array<R> {\n\n\treadonly meta: ListMeta\n\n\tconstructor(meta: ListMeta, data: R[]) {\n\t\tsuper(...(data || []))\n\t\tthis.meta = meta\n\t}\n\n\tfirst(): R | undefined { return this.length ? this[0] : undefined }\n\tlast(): R | undefined { return this.length ? this[this.length - 1] : undefined }\n\tget(index: number): R | undefined { return (this.length && (index >= 0)) ? this[index] : undefined }\n\n\thasNextPage(): boolean { return (this.meta.currentPage < this.meta.pageCount) }\n\thasPrevPage(): boolean { return (this.meta.currentPage > 1) }\n\n\tgetRecordCount(): number { return this.meta.recordCount }\n\tgetPageCount(): number { return this.meta.pageCount }\n\tget recordCount(): number { return this.meta.recordCount }\n\tget pageCount(): number { return this.meta.pageCount }\n\n}\n\n\nexport type { Metadata, ResourceType, ResourceId, Resource, ResourceCreate, ResourceUpdate, ListResponse, ListMeta, ResourceRel }\n\nexport type ResourceSort = Pick<Resource, 'id' | 'reference' | 'reference_origin' | 'created_at' | 'updated_at'>\nexport type ResourceFilter = Pick<Resource, 'id' | 'reference' | 'reference_origin' | 'metadata' | 'created_at' | 'updated_at'>\n\n\n\n// Resource adapters local configuration\ntype ResourceAdapterConfig = {\n\t// xyz?: boolean\n}\n\ntype ResourcesInitConfig = ResourceAdapterConfig & ApiClientInitConfig\ntype ResourcesConfig = Partial<ResourcesInitConfig>\n\n\nexport const apiResourceAdapter = (config: ResourcesInitConfig): ResourceAdapter => {\n\treturn new ResourceAdapter(config)\n}\n\n\nclass ResourceAdapter {\n\n\treadonly #client: ApiClient\n\n\treadonly #config: ResourceAdapterConfig = {}\n\n\tconstructor(config: ResourcesInitConfig) {\n\t\tthis.#client = ApiClient.create(config)\n\t\tthis.localConfig(config)\n\t}\n\n\n\tprivate localConfig(config: ResourceAdapterConfig): void {\n\t\t// if (typeof config.xyz !== 'undefined') this.#config.xyz = config.xyz\n\t}\n\n\n\tconfig(config: ResourcesConfig): this {\n\n\t\tdebug('config %o', config)\n\n\t\t// ResourceAdapter config\n\t\tthis.localConfig(config)\n\t\t// Client config\n\t\tthis.#client.config(config)\n\n\t\treturn this\n\n\t}\n\n\n\n\tget client(): Readonly<ApiClient> {\n\t\treturn this.#client\n\t}\n\n\n\n\tasync singleton<R extends Resource>(resource: ResourceType, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R> {\n\n\t\tdebug('singleton: %o, %O, %O', resource, params || {}, options || {})\n\n\t\tconst queryParams = generateQueryStringParams(params, resource)\n\t\tif (options?.params) Object.assign(queryParams, options?.params)\n\n\t\tconst res = await this.#client.request('GET', `${resource.type}`, undefined, { ...options, params: queryParams })\n\t\tconst r = denormalize<R>(res as DocWithData) as R\n\n\t\treturn r\n\n\t}\n\n\n\tasync retrieve<R extends Resource>(resource: ResourceId, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R> {\n\n\t\tdebug('retrieve: %o, %O, %O', resource, params || {}, options || {})\n\n\t\tconst queryParams = generateQueryStringParams(params, resource)\n\t\tif (options?.params) Object.assign(queryParams, options?.params)\n\n\t\tconst res = await this.#client.request('GET', `${resource.type}/${resource.id}`, undefined, { ...options, params: queryParams })\n\t\tconst r = denormalize<R>(res as DocWithData) as R\n\n\t\treturn r\n\n\t}\n\n\n\tasync list<R extends Resource>(resource: ResourceType, params?: QueryParamsList<R>, options?: ResourcesConfig): Promise<ListResponse<R>> {\n\n\t\tdebug('list: %o, %O, %O', resource, params || {}, options || {})\n\n\t\tconst queryParams = generateQueryStringParams(params, resource)\n\t\tif (options?.params) Object.assign(queryParams, options?.params)\n\n\t\tconst res = await this.#client.request('GET', `${resource.type}`, undefined, { ...options, params: queryParams })\n\t\tconst r = denormalize<R>(res as DocWithData) as R[]\n\n\t\tconst meta: ListMeta = {\n\t\t\tpageCount: Number(res.meta?.page_count),\n\t\t\trecordCount: Number(res.meta?.record_count),\n\t\t\tcurrentPage: params?.pageNumber || config.default.pageNumber,\n\t\t\trecordsPerPage: params?.pageSize || config.default.pageSize\n\t\t}\n\n\t\treturn new ListResponse(meta, r)\n\n\t}\n\n\n\tasync create<C extends ResourceCreate, R extends Resource>(resource: C & ResourceType, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R> {\n\n\t\tdebug('create: %o, %O, %O', resource, params || {}, options || {})\n\n\t\tconst queryParams = generateQueryStringParams<R>(params, resource)\n\t\tif (options?.params) Object.assign(queryParams, options?.params)\n\n\t\tconst data = normalize(resource)\n\t\tconst res = await this.#client.request('POST', resource.type, data, { ...options, params: queryParams })\n\t\tconst r = denormalize<R>(res as DocWithData) as R\n\n\t\treturn r\n\n\t}\n\n\n\tasync update<U extends ResourceUpdate, R extends Resource>(resource: U & ResourceId, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R> {\n\n\t\tdebug('update: %o, %O, %O', resource, params || {}, options || {})\n\n\t\tconst queryParams = generateQueryStringParams<R>(params, resource)\n\t\tif (options?.params) Object.assign(queryParams, options?.params)\n\n\t\tconst data = normalize(resource)\n\t\tconst res = await this.#client.request('PATCH', `${resource.type}/${resource.id}`, data, { ...options, params: queryParams })\n\t\tconst r = denormalize<R>(res as DocWithData) as R\n\n\t\treturn r\n\n\t}\n\n\n\tasync delete(resource: ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tdebug('delete: %o, %O', resource, options || {})\n\t\tawait this.#client.request('DELETE', `${resource.type}/${resource.id}`, undefined, options)\n\t}\n\n\n\tasync fetch<R extends Resource>(resource: string | ResourceType, path: string, params?: QueryParams<R>, options?: ResourcesConfig): Promise<R | ListResponse<R>> {\n\n\t\tdebug('fetch: %o, %O, %O', path, params || {}, options || {})\n\n\t\tconst queryParams = generateQueryStringParams<R>(params, resource)\n\t\tif (options?.params) Object.assign(queryParams, options?.params)\n\n\t\tconst res = await this.#client.request('GET', path, undefined, { ...options, params: queryParams })\n\t\tconst r = denormalize<R>(res as DocWithData)\n\n\t\tif (Array.isArray(r)) {\n\t\t\tconst p = params as QueryParamsList<R>\n\t\t\tconst meta: ListMeta = {\n\t\t\t\tpageCount: Number(res.meta?.page_count),\n\t\t\t\trecordCount: Number(res.meta?.record_count),\n\t\t\t\tcurrentPage: p?.pageNumber || config.default.pageNumber,\n\t\t\t\trecordsPerPage: p?.pageSize || config.default.pageSize\n\t\t\t}\n\t\t\treturn new ListResponse(meta, r)\n\t\t}\n\t\telse return r\n\n\t}\n\n}\n\n\n\nabstract class ApiResourceBase<R extends Resource> {\n\n\tstatic readonly TYPE: ResourceTypeLock\n\tprotected readonly resources: ResourceAdapter\n\n\tconstructor(adapter: ResourceAdapter) {\n\t\tdebug('new resource instance: %s', this.type())\n\t\tthis.resources = adapter\n\t}\n\n\tabstract relationship(id: string | ResourceId | null): ResourceRel\n\n\tprotected relationshipOneToOne<RR extends ResourceRel>(id: string | ResourceId | null): RR {\n\t\treturn (((id === null) || (typeof id === 'string')) ? { id, type: this.type() } : { id: id.id, type: this.type() }) as RR\n\t}\n\n\tprotected relationshipOneToMany<RR extends ResourceRel>(...ids: string[]): RR[] {\n\t\treturn (((ids === null) || (ids.length === 0) || (ids[0] === null))? [ { id: null, type: this.type() } ] : ids.map(id => { return { id, type: this.type() } })) as RR[]\n\t}\n\n\tabstract type(): ResourceTypeLock\n\n\n\n\t// reference, reference_origin and metadata attributes are always updatable\n\tasync update(resource: ResourceUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R> {\n\t\treturn this.resources.update<ResourceUpdate, R>({ ...resource, type: this.type() }, params, options)\n\t}\n\n}\n\n\nabstract class ApiResource<R extends Resource> extends ApiResourceBase<R> {\n\n\tasync retrieve(id: string | ResourceId, params?: QueryParamsRetrieve<R>, options?: ResourcesConfig): Promise<R> {\n\t\treturn this.resources.retrieve<R>((typeof id === 'string') ? { type: this.type(), id } : id, params, options)\n\t}\n\n\tasync list(params?: QueryParamsList<R>, options?: ResourcesConfig): Promise<ListResponse<R>> {\n\t\treturn this.resources.list<R>({ type: this.type() }, params, options)\n\t}\n\n\tasync count(filter?: QueryFilter | QueryParamsList<R>, options?: ResourcesConfig): Promise<number> {\n\t\tconst params: QueryParamsList<R> = { filters: isParamsList<R>(filter) ? filter.filters : filter, pageNumber: 1, pageSize: 1 }\n\t\tconst response = await this.list(params, options)\n\t\treturn Promise.resolve(response.meta.recordCount)\n\t}\n\n}\n\n\nabstract class ApiSingleton<R extends Resource> extends ApiResourceBase<R> {\n\n\tasync retrieve(params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R> {\n\t\treturn this.resources.singleton<R>({ type: this.type() }, params, options)\n\t}\n\n}\n\n\n\nexport default ResourceAdapter\n\nexport { ApiResource, ApiSingleton }\nexport type { ResourcesConfig, ResourcesInitConfig, ResourceAdapter }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Geocoder, GeocoderType } from './geocoders'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype AddressType = 'addresses'\ntype AddressRel = ResourceRel & { type: AddressType }\ntype GeocoderRel = ResourceRel & { type: GeocoderType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type AddressSort = Pick<Address, 'id' | 'city' | 'state_code' | 'country_code'> & ResourceSort\n// export type AddressFilter = Pick<Address, 'id' | 'business' | 'first_name' | 'last_name' | 'company' | 'line_1' | 'line_2' | 'city' | 'zip_code' | 'state_code' | 'country_code' | 'phone' | 'email' | 'notes' | 'lat' | 'lng' | 'billing_info'> & ResourceFilter\n\n\ninterface Address extends Resource {\n\t\n\treadonly type: AddressType\n\n\tbusiness?: boolean | null\n\tfirst_name?: string | null\n\tlast_name?: string | null\n\tcompany?: string | null\n\tfull_name?: string | null\n\tline_1: string\n\tline_2?: string | null\n\tcity: string\n\tzip_code?: string | null\n\tstate_code: string\n\tcountry_code: string\n\tphone: string\n\tfull_address?: string | null\n\tname?: string | null\n\temail?: string | null\n\tnotes?: string | null\n\tlat?: number | null\n\tlng?: number | null\n\tis_localized?: boolean | null\n\tis_geocoded?: boolean | null\n\tprovider_name?: string | null\n\tmap_url?: string | null\n\tstatic_map_url?: string | null\n\tbilling_info?: string | null\n\n\tgeocoder?: Geocoder | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface AddressCreate extends ResourceCreate {\n\t\n\tbusiness?: boolean | null\n\tfirst_name?: string | null\n\tlast_name?: string | null\n\tcompany?: string | null\n\tline_1: string\n\tline_2?: string | null\n\tcity: string\n\tzip_code?: string | null\n\tstate_code: string\n\tcountry_code: string\n\tphone: string\n\temail?: string | null\n\tnotes?: string | null\n\tlat?: number | null\n\tlng?: number | null\n\tbilling_info?: string | null\n\n\tgeocoder?: GeocoderRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface AddressUpdate extends ResourceUpdate {\n\t\n\tbusiness?: boolean | null\n\tfirst_name?: string | null\n\tlast_name?: string | null\n\tcompany?: string | null\n\tline_1?: string | null\n\tline_2?: string | null\n\tcity?: string | null\n\tzip_code?: string | null\n\tstate_code?: string | null\n\tcountry_code?: string | null\n\tphone?: string | null\n\temail?: string | null\n\tnotes?: string | null\n\tlat?: number | null\n\tlng?: number | null\n\tbilling_info?: string | null\n\n\tgeocoder?: GeocoderRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Addresses extends ApiResource<Address> {\n\n\tstatic readonly TYPE: AddressType = 'addresses' as const\n\n\tasync create(resource: AddressCreate, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\treturn this.resources.create<AddressCreate, Address>({ ...resource, type: Addresses.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AddressUpdate, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\treturn this.resources.update<AddressUpdate, Address>({ ...resource, type: Addresses.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Addresses.TYPE } : id, options)\n\t}\n\n\tasync geocoder(addressId: string | Address, params?: QueryParamsRetrieve<Geocoder>, options?: ResourcesConfig): Promise<Geocoder> {\n\t\tconst _addressId = (addressId as Address).id || addressId as string\n\t\treturn this.resources.fetch<Geocoder>({ type: 'geocoders' }, `addresses/${_addressId}/geocoder`, params, options) as unknown as Geocoder\n\t}\n\n\tasync events(addressId: string | Address, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _addressId = (addressId as Address).id || addressId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `addresses/${_addressId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(addressId: string | Address, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _addressId = (addressId as Address).id || addressId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `addresses/${_addressId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(addressId: string | Address, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _addressId = (addressId as Address).id || addressId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `addresses/${_addressId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisAddress(resource: any): resource is Address {\n\t\treturn resource.type && (resource.type === Addresses.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AddressRel {\n\t\treturn super.relationshipOneToOne<AddressRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AddressRel[] {\n\t\treturn super.relationshipOneToMany<AddressRel>(...ids)\n\t}\n\n\n\ttype(): AddressType {\n\t\treturn Addresses.TYPE\n\t}\n\n}\n\n\nexport default Addresses\n\nexport type { Address, AddressCreate, AddressUpdate, AddressType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Version } from './versions'\n\n\ntype AdjustmentType = 'adjustments'\ntype AdjustmentRel = ResourceRel & { type: AdjustmentType }\n\n\nexport type AdjustmentSort = Pick<Adjustment, 'id' | 'name' | 'currency_code' | 'amount_cents'> & ResourceSort\n// export type AdjustmentFilter = Pick<Adjustment, 'id' | 'name' | 'currency_code' | 'amount_cents'> & ResourceFilter\n\n\ninterface Adjustment extends Resource {\n\t\n\treadonly type: AdjustmentType\n\n\tname: string\n\tcurrency_code: string\n\tamount_cents: number\n\tamount_float: number\n\tformatted_amount: string\n\tdistribute_discount?: boolean | null\n\n\tversions?: Version[] | null\n\n}\n\n\ninterface AdjustmentCreate extends ResourceCreate {\n\t\n\tname: string\n\tcurrency_code: string\n\tamount_cents: number\n\tdistribute_discount?: boolean | null\n\t\n}\n\n\ninterface AdjustmentUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tcurrency_code?: string | null\n\tamount_cents?: number | null\n\tdistribute_discount?: boolean | null\n\t\n}\n\n\nclass Adjustments extends ApiResource<Adjustment> {\n\n\tstatic readonly TYPE: AdjustmentType = 'adjustments' as const\n\n\tasync create(resource: AdjustmentCreate, params?: QueryParamsRetrieve<Adjustment>, options?: ResourcesConfig): Promise<Adjustment> {\n\t\treturn this.resources.create<AdjustmentCreate, Adjustment>({ ...resource, type: Adjustments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AdjustmentUpdate, params?: QueryParamsRetrieve<Adjustment>, options?: ResourcesConfig): Promise<Adjustment> {\n\t\treturn this.resources.update<AdjustmentUpdate, Adjustment>({ ...resource, type: Adjustments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Adjustments.TYPE } : id, options)\n\t}\n\n\tasync versions(adjustmentId: string | Adjustment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _adjustmentId = (adjustmentId as Adjustment).id || adjustmentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `adjustments/${_adjustmentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisAdjustment(resource: any): resource is Adjustment {\n\t\treturn resource.type && (resource.type === Adjustments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AdjustmentRel {\n\t\treturn super.relationshipOneToOne<AdjustmentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AdjustmentRel[] {\n\t\treturn super.relationshipOneToMany<AdjustmentRel>(...ids)\n\t}\n\n\n\ttype(): AdjustmentType {\n\t\treturn Adjustments.TYPE\n\t}\n\n}\n\n\nexport default Adjustments\n\nexport type { Adjustment, AdjustmentCreate, AdjustmentUpdate, AdjustmentType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { AdyenPayment, AdyenPaymentType } from './adyen_payments'\n\n\ntype AdyenGatewayType = 'adyen_gateways'\ntype AdyenGatewayRel = ResourceRel & { type: AdyenGatewayType }\ntype AdyenPaymentRel = ResourceRel & { type: AdyenPaymentType }\n\n\nexport type AdyenGatewaySort = Pick<AdyenGateway, 'id' | 'name'> & ResourceSort\n// export type AdyenGatewayFilter = Pick<AdyenGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface AdyenGateway extends Resource {\n\t\n\treadonly type: AdyenGatewayType\n\n\tname: string\n\tlive_url_prefix: string\n\tasync_api?: boolean | null\n\twebhook_endpoint_secret?: string | null\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tadyen_payments?: AdyenPayment[] | null\n\n}\n\n\ninterface AdyenGatewayCreate extends ResourceCreate {\n\t\n\tname: string\n\tmerchant_account: string\n\tapi_key: string\n\tpublic_key?: string | null\n\tlive_url_prefix: string\n\tapi_version?: number | null\n\tasync_api?: boolean | null\n\twebhook_endpoint_secret?: string | null\n\n\tadyen_payments?: AdyenPaymentRel[] | null\n\n}\n\n\ninterface AdyenGatewayUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tmerchant_account?: string | null\n\tapi_key?: string | null\n\tpublic_key?: string | null\n\tlive_url_prefix?: string | null\n\tapi_version?: number | null\n\tasync_api?: boolean | null\n\twebhook_endpoint_secret?: string | null\n\n\tadyen_payments?: AdyenPaymentRel[] | null\n\n}\n\n\nclass AdyenGateways extends ApiResource<AdyenGateway> {\n\n\tstatic readonly TYPE: AdyenGatewayType = 'adyen_gateways' as const\n\n\tasync create(resource: AdyenGatewayCreate, params?: QueryParamsRetrieve<AdyenGateway>, options?: ResourcesConfig): Promise<AdyenGateway> {\n\t\treturn this.resources.create<AdyenGatewayCreate, AdyenGateway>({ ...resource, type: AdyenGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AdyenGatewayUpdate, params?: QueryParamsRetrieve<AdyenGateway>, options?: ResourcesConfig): Promise<AdyenGateway> {\n\t\treturn this.resources.update<AdyenGatewayUpdate, AdyenGateway>({ ...resource, type: AdyenGateways.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: AdyenGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _adyenGatewayId = (adyenGatewayId as AdyenGateway).id || adyenGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `adyen_gateways/${_adyenGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _adyenGatewayId = (adyenGatewayId as AdyenGateway).id || adyenGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `adyen_gateways/${_adyenGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync adyen_payments(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList<AdyenPayment>, options?: ResourcesConfig): Promise<ListResponse<AdyenPayment>> {\n\t\tconst _adyenGatewayId = (adyenGatewayId as AdyenGateway).id || adyenGatewayId as string\n\t\treturn this.resources.fetch<AdyenPayment>({ type: 'adyen_payments' }, `adyen_gateways/${_adyenGatewayId}/adyen_payments`, params, options) as unknown as ListResponse<AdyenPayment>\n\t}\n\n\n\tisAdyenGateway(resource: any): resource is AdyenGateway {\n\t\treturn resource.type && (resource.type === AdyenGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AdyenGatewayRel {\n\t\treturn super.relationshipOneToOne<AdyenGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AdyenGatewayRel[] {\n\t\treturn super.relationshipOneToMany<AdyenGatewayRel>(...ids)\n\t}\n\n\n\ttype(): AdyenGatewayType {\n\t\treturn AdyenGateways.TYPE\n\t}\n\n}\n\n\nexport default AdyenGateways\n\nexport type { AdyenGateway, AdyenGatewayCreate, AdyenGatewayUpdate, AdyenGatewayType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype AdyenPaymentType = 'adyen_payments'\ntype AdyenPaymentRel = ResourceRel & { type: AdyenPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type AdyenPaymentSort = Pick<AdyenPayment, 'id'> & ResourceSort\n// export type AdyenPaymentFilter = Pick<AdyenPayment, 'id'> & ResourceFilter\n\n\ninterface AdyenPayment extends Resource {\n\t\n\treadonly type: AdyenPaymentType\n\n\tpublic_key?: string | null\n\tpayment_methods: Record<string, any>\n\tpayment_request_data?: Record<string, any> | null\n\tpayment_request_details?: Record<string, any> | null\n\tpayment_response?: Record<string, any> | null\n\tmismatched_amounts?: boolean | null\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface AdyenPaymentCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\n}\n\n\ninterface AdyenPaymentUpdate extends ResourceUpdate {\n\t\n\tpayment_request_data?: Record<string, any> | null\n\tpayment_request_details?: Record<string, any> | null\n\tpayment_response?: Record<string, any> | null\n\t_details?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass AdyenPayments extends ApiResource<AdyenPayment> {\n\n\tstatic readonly TYPE: AdyenPaymentType = 'adyen_payments' as const\n\n\tasync create(resource: AdyenPaymentCreate, params?: QueryParamsRetrieve<AdyenPayment>, options?: ResourcesConfig): Promise<AdyenPayment> {\n\t\treturn this.resources.create<AdyenPaymentCreate, AdyenPayment>({ ...resource, type: AdyenPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AdyenPaymentUpdate, params?: QueryParamsRetrieve<AdyenPayment>, options?: ResourcesConfig): Promise<AdyenPayment> {\n\t\treturn this.resources.update<AdyenPaymentUpdate, AdyenPayment>({ ...resource, type: AdyenPayments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: AdyenPayments.TYPE } : id, options)\n\t}\n\n\tasync order(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _adyenPaymentId = (adyenPaymentId as AdyenPayment).id || adyenPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `adyen_payments/${_adyenPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _adyenPaymentId = (adyenPaymentId as AdyenPayment).id || adyenPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `adyen_payments/${_adyenPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(adyenPaymentId: string | AdyenPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _adyenPaymentId = (adyenPaymentId as AdyenPayment).id || adyenPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `adyen_payments/${_adyenPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _details(id: string | AdyenPayment, params?: QueryParamsRetrieve<AdyenPayment>, options?: ResourcesConfig): Promise<AdyenPayment> {\n\t\treturn this.resources.update<AdyenPaymentUpdate, AdyenPayment>({ id: (typeof id === 'string')? id: id.id, type: AdyenPayments.TYPE, _details: true }, params, options)\n\t}\n\n\n\tisAdyenPayment(resource: any): resource is AdyenPayment {\n\t\treturn resource.type && (resource.type === AdyenPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AdyenPaymentRel {\n\t\treturn super.relationshipOneToOne<AdyenPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AdyenPaymentRel[] {\n\t\treturn super.relationshipOneToMany<AdyenPaymentRel>(...ids)\n\t}\n\n\n\ttype(): AdyenPaymentType {\n\t\treturn AdyenPayments.TYPE\n\t}\n\n}\n\n\nexport default AdyenPayments\n\nexport type { AdyenPayment, AdyenPaymentCreate, AdyenPaymentUpdate, AdyenPaymentType }\n","import { ApiSingleton } from '../resource'\nimport type { Resource, ResourceId, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\n\n\n\n\ntype ApplicationType = 'application'\ntype ApplicationRel = ResourceRel & { type: ApplicationType }\n\n\nexport type ApplicationSort = Pick<Application, 'id'> & ResourceSort\n// export type ApplicationFilter = Pick<Application, 'id' | 'name' | 'kind' | 'public_access' | 'scopes'> & ResourceFilter\n\n\ninterface Application extends Resource {\n\t\n\treadonly type: ApplicationType\n\n\tname?: string | null\n\tkind?: string | null\n\tpublic_access?: boolean | null\n\tredirect_uri?: string | null\n\tscopes?: string | null\n\t\n}\n\n\nclass Applications extends ApiSingleton<Application> {\n\n\tstatic readonly TYPE: ApplicationType = 'application' as const\n\n\t\n\n\n\tisApplication(resource: any): resource is Application {\n\t\treturn resource.type && (resource.type === Applications.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ApplicationRel {\n\t\treturn super.relationshipOneToOne<ApplicationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ApplicationRel[] {\n\t\treturn super.relationshipOneToMany<ApplicationRel>(...ids)\n\t}\n\n\n\ttype(): ApplicationType {\n\t\treturn Applications.TYPE\n\t}\n\n}\n\n\nexport default Applications\n\nexport type { Application, ApplicationType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\nimport type { Bundle, BundleType } from './bundles'\nimport type { CarrierAccount, CarrierAccountType } from './carrier_accounts'\nimport type { CustomerGroup, CustomerGroupType } from './customer_groups'\nimport type { Customer, CustomerType } from './customers'\nimport type { DeliveryLeadTime, DeliveryLeadTimeType } from './delivery_lead_times'\nimport type { Geocoder, GeocoderType } from './geocoders'\nimport type { GiftCardRecipient, GiftCardRecipientType } from './gift_card_recipients'\nimport type { GiftCard, GiftCardType } from './gift_cards'\nimport type { InventoryModel, InventoryModelType } from './inventory_models'\nimport type { Market, MarketType } from './markets'\nimport type { Merchant, MerchantType } from './merchants'\nimport type { BillingInfoValidationRule, BillingInfoValidationRuleType } from './billing_info_validation_rules'\nimport type { Order, OrderType } from './orders'\nimport type { Package, PackageType } from './packages'\nimport type { Parcel, ParcelType } from './parcels'\nimport type { PaymentMethod, PaymentMethodType } from './payment_methods'\nimport type { PriceList, PriceListType } from './price_lists'\nimport type { Price, PriceType } from './prices'\nimport type { Promotion, PromotionType } from './promotions'\nimport type { Return, ReturnType } from './returns'\nimport type { Shipment, ShipmentType } from './shipments'\nimport type { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { ShippingZone, ShippingZoneType } from './shipping_zones'\nimport type { SkuOption, SkuOptionType } from './sku_options'\nimport type { Sku, SkuType } from './skus'\nimport type { StockItem, StockItemType } from './stock_items'\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { TaxCalculator, TaxCalculatorType } from './tax_calculators'\nimport type { TaxCategory, TaxCategoryType } from './tax_categories'\n\n\ntype AttachmentType = 'attachments'\ntype AttachmentRel = ResourceRel & { type: AttachmentType }\ntype BundleRel = ResourceRel & { type: BundleType }\ntype CarrierAccountRel = ResourceRel & { type: CarrierAccountType }\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype DeliveryLeadTimeRel = ResourceRel & { type: DeliveryLeadTimeType }\ntype GeocoderRel = ResourceRel & { type: GeocoderType }\ntype GiftCardRecipientRel = ResourceRel & { type: GiftCardRecipientType }\ntype GiftCardRel = ResourceRel & { type: GiftCardType }\ntype InventoryModelRel = ResourceRel & { type: InventoryModelType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype MerchantRel = ResourceRel & { type: MerchantType }\ntype BillingInfoValidationRuleRel = ResourceRel & { type: BillingInfoValidationRuleType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype PackageRel = ResourceRel & { type: PackageType }\ntype ParcelRel = ResourceRel & { type: ParcelType }\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\ntype PriceListRel = ResourceRel & { type: PriceListType }\ntype PriceRel = ResourceRel & { type: PriceType }\ntype PromotionRel = ResourceRel & { type: PromotionType }\ntype ReturnRel = ResourceRel & { type: ReturnType }\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype ShippingZoneRel = ResourceRel & { type: ShippingZoneType }\ntype SkuOptionRel = ResourceRel & { type: SkuOptionType }\ntype SkuRel = ResourceRel & { type: SkuType }\ntype StockItemRel = ResourceRel & { type: StockItemType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype TaxCalculatorRel = ResourceRel & { type: TaxCalculatorType }\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\n\n\nexport type AttachmentSort = Pick<Attachment, 'id' | 'name'> & ResourceSort\n// export type AttachmentFilter = Pick<Attachment, 'id' | 'name' | 'description'> & ResourceFilter\n\n\ninterface Attachment extends Resource {\n\t\n\treadonly type: AttachmentType\n\n\tname: string\n\tdescription?: string | null\n\turl?: string | null\n\n\tattachable?: Bundle | CarrierAccount | CustomerGroup | Customer | DeliveryLeadTime | Geocoder | GiftCardRecipient | GiftCard | InventoryModel | Market | Merchant | BillingInfoValidationRule | Order | Package | Parcel | PaymentMethod | PriceList | Price | Promotion | Return | Shipment | ShippingCategory | ShippingMethod | ShippingZone | SkuOption | Sku | StockItem | StockLocation | TaxCalculator | TaxCategory | null\n\n}\n\n\ninterface AttachmentCreate extends ResourceCreate {\n\t\n\tname: string\n\tdescription?: string | null\n\turl?: string | null\n\n\tattachable: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel\n\n}\n\n\ninterface AttachmentUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tdescription?: string | null\n\turl?: string | null\n\n\tattachable?: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel | null\n\n}\n\n\nclass Attachments extends ApiResource<Attachment> {\n\n\tstatic readonly TYPE: AttachmentType = 'attachments' as const\n\n\tasync create(resource: AttachmentCreate, params?: QueryParamsRetrieve<Attachment>, options?: ResourcesConfig): Promise<Attachment> {\n\t\treturn this.resources.create<AttachmentCreate, Attachment>({ ...resource, type: Attachments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AttachmentUpdate, params?: QueryParamsRetrieve<Attachment>, options?: ResourcesConfig): Promise<Attachment> {\n\t\treturn this.resources.update<AttachmentUpdate, Attachment>({ ...resource, type: Attachments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Attachments.TYPE } : id, options)\n\t}\n\n\n\tisAttachment(resource: any): resource is Attachment {\n\t\treturn resource.type && (resource.type === Attachments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AttachmentRel {\n\t\treturn super.relationshipOneToOne<AttachmentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AttachmentRel[] {\n\t\treturn super.relationshipOneToMany<AttachmentRel>(...ids)\n\t}\n\n\n\ttype(): AttachmentType {\n\t\treturn Attachments.TYPE\n\t}\n\n}\n\n\nexport default Attachments\n\nexport type { Attachment, AttachmentCreate, AttachmentUpdate, AttachmentType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order } from './orders'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { Capture } from './captures'\nimport type { Void } from './voids'\n\n\ntype AuthorizationType = 'authorizations'\ntype AuthorizationRel = ResourceRel & { type: AuthorizationType }\n\n\nexport type AuthorizationSort = Pick<Authorization, 'id' | 'number' | 'amount_cents'> & ResourceSort\n// export type AuthorizationFilter = Pick<Authorization, 'id' | 'number' | 'currency_code' | 'amount_cents' | 'succeeded' | 'message' | 'error_code' | 'error_detail' | 'token' | 'gateway_transaction_id'> & ResourceFilter\n\n\ninterface Authorization extends Resource {\n\t\n\treadonly type: AuthorizationType\n\n\tnumber: string\n\tcurrency_code: string\n\tamount_cents: number\n\tamount_float: number\n\tformatted_amount: string\n\tsucceeded: boolean\n\tmessage?: string | null\n\terror_code?: string | null\n\terror_detail?: string | null\n\ttoken?: string | null\n\tgateway_transaction_id?: string | null\n\tcvv_code?: string | null\n\tcvv_message?: string | null\n\tavs_code?: string | null\n\tavs_message?: string | null\n\tfraud_review?: string | null\n\tcapture_amount_cents?: number | null\n\tcapture_amount_float?: number | null\n\tformatted_capture_amount?: string | null\n\tcapture_balance_cents?: number | null\n\tcapture_balance_float?: number | null\n\tformatted_capture_balance?: string | null\n\tvoid_balance_cents?: number | null\n\tvoid_balance_float?: number | null\n\tformatted_void_balance?: string | null\n\n\torder?: Order | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\tcaptures?: Capture[] | null\n\tvoids?: Void[] | null\n\n}\n\n\ninterface AuthorizationUpdate extends ResourceUpdate {\n\t\n\t_capture?: boolean | null\n\t_capture_amount_cents?: number | null\n\t_void?: boolean | null\n\t\n}\n\n\nclass Authorizations extends ApiResource<Authorization> {\n\n\tstatic readonly TYPE: AuthorizationType = 'authorizations' as const\n\n\tasync update(resource: AuthorizationUpdate, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ ...resource, type: Authorizations.TYPE }, params, options)\n\t}\n\n\tasync order(authorizationId: string | Authorization, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `authorizations/${_authorizationId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(authorizationId: string | Authorization, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `authorizations/${_authorizationId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(authorizationId: string | Authorization, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `authorizations/${_authorizationId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(authorizationId: string | Authorization, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `authorizations/${_authorizationId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync captures(authorizationId: string | Authorization, params?: QueryParamsList<Capture>, options?: ResourcesConfig): Promise<ListResponse<Capture>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Capture>({ type: 'captures' }, `authorizations/${_authorizationId}/captures`, params, options) as unknown as ListResponse<Capture>\n\t}\n\n\tasync voids(authorizationId: string | Authorization, params?: QueryParamsList<Void>, options?: ResourcesConfig): Promise<ListResponse<Void>> {\n\t\tconst _authorizationId = (authorizationId as Authorization).id || authorizationId as string\n\t\treturn this.resources.fetch<Void>({ type: 'voids' }, `authorizations/${_authorizationId}/voids`, params, options) as unknown as ListResponse<Void>\n\t}\n\n\tasync _capture(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _capture: true }, params, options)\n\t}\n\n\tasync _capture_amount_cents(id: string | Authorization, triggerValue: number, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _capture_amount_cents: triggerValue }, params, options)\n\t}\n\n\tasync _void(id: string | Authorization, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\treturn this.resources.update<AuthorizationUpdate, Authorization>({ id: (typeof id === 'string')? id: id.id, type: Authorizations.TYPE, _void: true }, params, options)\n\t}\n\n\n\tisAuthorization(resource: any): resource is Authorization {\n\t\treturn resource.type && (resource.type === Authorizations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AuthorizationRel {\n\t\treturn super.relationshipOneToOne<AuthorizationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AuthorizationRel[] {\n\t\treturn super.relationshipOneToMany<AuthorizationRel>(...ids)\n\t}\n\n\n\ttype(): AuthorizationType {\n\t\treturn Authorizations.TYPE\n\t}\n\n}\n\n\nexport default Authorizations\n\nexport type { Authorization, AuthorizationUpdate, AuthorizationType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { TaxCategory, TaxCategoryType } from './tax_categories'\n\n\ntype AvalaraAccountType = 'avalara_accounts'\ntype AvalaraAccountRel = ResourceRel & { type: AvalaraAccountType }\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\n\n\nexport type AvalaraAccountSort = Pick<AvalaraAccount, 'id' | 'name'> & ResourceSort\n// export type AvalaraAccountFilter = Pick<AvalaraAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface AvalaraAccount extends Resource {\n\t\n\treadonly type: AvalaraAccountType\n\n\tname: string\n\tusername: string\n\tcompany_code: string\n\tcommit_invoice?: boolean | null\n\tddp?: boolean | null\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\ttax_categories?: TaxCategory[] | null\n\n}\n\n\ninterface AvalaraAccountCreate extends ResourceCreate {\n\t\n\tname: string\n\tusername: string\n\tpassword: string\n\tcompany_code: string\n\tcommit_invoice?: boolean | null\n\tddp?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\ninterface AvalaraAccountUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tusername?: string | null\n\tpassword?: string | null\n\tcompany_code?: string | null\n\tcommit_invoice?: boolean | null\n\tddp?: boolean | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\nclass AvalaraAccounts extends ApiResource<AvalaraAccount> {\n\n\tstatic readonly TYPE: AvalaraAccountType = 'avalara_accounts' as const\n\n\tasync create(resource: AvalaraAccountCreate, params?: QueryParamsRetrieve<AvalaraAccount>, options?: ResourcesConfig): Promise<AvalaraAccount> {\n\t\treturn this.resources.create<AvalaraAccountCreate, AvalaraAccount>({ ...resource, type: AvalaraAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AvalaraAccountUpdate, params?: QueryParamsRetrieve<AvalaraAccount>, options?: ResourcesConfig): Promise<AvalaraAccount> {\n\t\treturn this.resources.update<AvalaraAccountUpdate, AvalaraAccount>({ ...resource, type: AvalaraAccounts.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: AvalaraAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `avalara_accounts/${_avalaraAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `avalara_accounts/${_avalaraAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `avalara_accounts/${_avalaraAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync tax_categories(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList<TaxCategory>, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>> {\n\t\tconst _avalaraAccountId = (avalaraAccountId as AvalaraAccount).id || avalaraAccountId as string\n\t\treturn this.resources.fetch<TaxCategory>({ type: 'tax_categories' }, `avalara_accounts/${_avalaraAccountId}/tax_categories`, params, options) as unknown as ListResponse<TaxCategory>\n\t}\n\n\n\tisAvalaraAccount(resource: any): resource is AvalaraAccount {\n\t\treturn resource.type && (resource.type === AvalaraAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AvalaraAccountRel {\n\t\treturn super.relationshipOneToOne<AvalaraAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AvalaraAccountRel[] {\n\t\treturn super.relationshipOneToMany<AvalaraAccountRel>(...ids)\n\t}\n\n\n\ttype(): AvalaraAccountType {\n\t\treturn AvalaraAccounts.TYPE\n\t}\n\n}\n\n\nexport default AvalaraAccounts\n\nexport type { AvalaraAccount, AvalaraAccountCreate, AvalaraAccountUpdate, AvalaraAccountType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { AxervePayment, AxervePaymentType } from './axerve_payments'\n\n\ntype AxerveGatewayType = 'axerve_gateways'\ntype AxerveGatewayRel = ResourceRel & { type: AxerveGatewayType }\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\n\n\nexport type AxerveGatewaySort = Pick<AxerveGateway, 'id' | 'name'> & ResourceSort\n// export type AxerveGatewayFilter = Pick<AxerveGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface AxerveGateway extends Resource {\n\t\n\treadonly type: AxerveGatewayType\n\n\tname: string\n\tlogin: string\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\taxerve_payments?: AxervePayment[] | null\n\n}\n\n\ninterface AxerveGatewayCreate extends ResourceCreate {\n\t\n\tname: string\n\tlogin: string\n\tapi_key: string\n\n\taxerve_payments?: AxervePaymentRel[] | null\n\n}\n\n\ninterface AxerveGatewayUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tlogin?: string | null\n\tapi_key?: string | null\n\n\taxerve_payments?: AxervePaymentRel[] | null\n\n}\n\n\nclass AxerveGateways extends ApiResource<AxerveGateway> {\n\n\tstatic readonly TYPE: AxerveGatewayType = 'axerve_gateways' as const\n\n\tasync create(resource: AxerveGatewayCreate, params?: QueryParamsRetrieve<AxerveGateway>, options?: ResourcesConfig): Promise<AxerveGateway> {\n\t\treturn this.resources.create<AxerveGatewayCreate, AxerveGateway>({ ...resource, type: AxerveGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AxerveGatewayUpdate, params?: QueryParamsRetrieve<AxerveGateway>, options?: ResourcesConfig): Promise<AxerveGateway> {\n\t\treturn this.resources.update<AxerveGatewayUpdate, AxerveGateway>({ ...resource, type: AxerveGateways.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: AxerveGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `axerve_gateways/${_axerveGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `axerve_gateways/${_axerveGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync axerve_payments(axerveGatewayId: string | AxerveGateway, params?: QueryParamsList<AxervePayment>, options?: ResourcesConfig): Promise<ListResponse<AxervePayment>> {\n\t\tconst _axerveGatewayId = (axerveGatewayId as AxerveGateway).id || axerveGatewayId as string\n\t\treturn this.resources.fetch<AxervePayment>({ type: 'axerve_payments' }, `axerve_gateways/${_axerveGatewayId}/axerve_payments`, params, options) as unknown as ListResponse<AxervePayment>\n\t}\n\n\n\tisAxerveGateway(resource: any): resource is AxerveGateway {\n\t\treturn resource.type && (resource.type === AxerveGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AxerveGatewayRel {\n\t\treturn super.relationshipOneToOne<AxerveGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AxerveGatewayRel[] {\n\t\treturn super.relationshipOneToMany<AxerveGatewayRel>(...ids)\n\t}\n\n\n\ttype(): AxerveGatewayType {\n\t\treturn AxerveGateways.TYPE\n\t}\n\n}\n\n\nexport default AxerveGateways\n\nexport type { AxerveGateway, AxerveGatewayCreate, AxerveGatewayUpdate, AxerveGatewayType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype AxervePaymentType = 'axerve_payments'\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type AxervePaymentSort = Pick<AxervePayment, 'id'> & ResourceSort\n// export type AxervePaymentFilter = Pick<AxervePayment, 'id'> & ResourceFilter\n\n\ninterface AxervePayment extends Resource {\n\t\n\treadonly type: AxervePaymentType\n\n\tlogin: string\n\treturn_url: string\n\tpayment_request_data?: Record<string, any> | null\n\tclient_ip?: string | null\n\tbuyer_details?: Record<string, any> | null\n\trequest_token?: boolean | null\n\tmismatched_amounts?: boolean | null\n\tintent_amount_cents: number\n\tintent_amount_float?: number | null\n\tformatted_intent_amount?: string | null\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface AxervePaymentCreate extends ResourceCreate {\n\t\n\treturn_url: string\n\tclient_ip?: string | null\n\tbuyer_details?: Record<string, any> | null\n\trequest_token?: boolean | null\n\n\torder: OrderRel\n\n}\n\n\ninterface AxervePaymentUpdate extends ResourceUpdate {\n\t\n\tpayment_request_data?: Record<string, any> | null\n\t_update?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass AxervePayments extends ApiResource<AxervePayment> {\n\n\tstatic readonly TYPE: AxervePaymentType = 'axerve_payments' as const\n\n\tasync create(resource: AxervePaymentCreate, params?: QueryParamsRetrieve<AxervePayment>, options?: ResourcesConfig): Promise<AxervePayment> {\n\t\treturn this.resources.create<AxervePaymentCreate, AxervePayment>({ ...resource, type: AxervePayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: AxervePaymentUpdate, params?: QueryParamsRetrieve<AxervePayment>, options?: ResourcesConfig): Promise<AxervePayment> {\n\t\treturn this.resources.update<AxervePaymentUpdate, AxervePayment>({ ...resource, type: AxervePayments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: AxervePayments.TYPE } : id, options)\n\t}\n\n\tasync order(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _axervePaymentId = (axervePaymentId as AxervePayment).id || axervePaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `axerve_payments/${_axervePaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(axervePaymentId: string | AxervePayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _axervePaymentId = (axervePaymentId as AxervePayment).id || axervePaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `axerve_payments/${_axervePaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(axervePaymentId: string | AxervePayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _axervePaymentId = (axervePaymentId as AxervePayment).id || axervePaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `axerve_payments/${_axervePaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _update(id: string | AxervePayment, params?: QueryParamsRetrieve<AxervePayment>, options?: ResourcesConfig): Promise<AxervePayment> {\n\t\treturn this.resources.update<AxervePaymentUpdate, AxervePayment>({ id: (typeof id === 'string')? id: id.id, type: AxervePayments.TYPE, _update: true }, params, options)\n\t}\n\n\n\tisAxervePayment(resource: any): resource is AxervePayment {\n\t\treturn resource.type && (resource.type === AxervePayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): AxervePaymentRel {\n\t\treturn super.relationshipOneToOne<AxervePaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): AxervePaymentRel[] {\n\t\treturn super.relationshipOneToMany<AxervePaymentRel>(...ids)\n\t}\n\n\n\ttype(): AxervePaymentType {\n\t\treturn AxervePayments.TYPE\n\t}\n\n}\n\n\nexport default AxervePayments\n\nexport type { AxervePayment, AxervePaymentCreate, AxervePaymentUpdate, AxervePaymentType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype BillingInfoValidationRuleType = 'billing_info_validation_rules'\ntype BillingInfoValidationRuleRel = ResourceRel & { type: BillingInfoValidationRuleType }\ntype MarketRel = ResourceRel & { type: MarketType }\n\n\nexport type BillingInfoValidationRuleSort = Pick<BillingInfoValidationRule, 'id'> & ResourceSort\n// export type BillingInfoValidationRuleFilter = Pick<BillingInfoValidationRule, 'id'> & ResourceFilter\n\n\ninterface BillingInfoValidationRule extends Resource {\n\t\n\treadonly type: BillingInfoValidationRuleType\n\n\n\tmarket?: Market | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface BillingInfoValidationRuleCreate extends ResourceCreate {\n\t\n\tmarket: MarketRel\n\n}\n\n\ninterface BillingInfoValidationRuleUpdate extends ResourceUpdate {\n\t\n\tmarket?: MarketRel | null\n\n}\n\n\nclass BillingInfoValidationRules extends ApiResource<BillingInfoValidationRule> {\n\n\tstatic readonly TYPE: BillingInfoValidationRuleType = 'billing_info_validation_rules' as const\n\n\tasync create(resource: BillingInfoValidationRuleCreate, params?: QueryParamsRetrieve<BillingInfoValidationRule>, options?: ResourcesConfig): Promise<BillingInfoValidationRule> {\n\t\treturn this.resources.create<BillingInfoValidationRuleCreate, BillingInfoValidationRule>({ ...resource, type: BillingInfoValidationRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BillingInfoValidationRuleUpdate, params?: QueryParamsRetrieve<BillingInfoValidationRule>, options?: ResourcesConfig): Promise<BillingInfoValidationRule> {\n\t\treturn this.resources.update<BillingInfoValidationRuleUpdate, BillingInfoValidationRule>({ ...resource, type: BillingInfoValidationRules.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: BillingInfoValidationRules.TYPE } : id, options)\n\t}\n\n\tasync market(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _billingInfoValidationRuleId = (billingInfoValidationRuleId as BillingInfoValidationRule).id || billingInfoValidationRuleId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `billing_info_validation_rules/${_billingInfoValidationRuleId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync attachments(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _billingInfoValidationRuleId = (billingInfoValidationRuleId as BillingInfoValidationRule).id || billingInfoValidationRuleId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `billing_info_validation_rules/${_billingInfoValidationRuleId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _billingInfoValidationRuleId = (billingInfoValidationRuleId as BillingInfoValidationRule).id || billingInfoValidationRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `billing_info_validation_rules/${_billingInfoValidationRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisBillingInfoValidationRule(resource: any): resource is BillingInfoValidationRule {\n\t\treturn resource.type && (resource.type === BillingInfoValidationRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BillingInfoValidationRuleRel {\n\t\treturn super.relationshipOneToOne<BillingInfoValidationRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BillingInfoValidationRuleRel[] {\n\t\treturn super.relationshipOneToMany<BillingInfoValidationRuleRel>(...ids)\n\t}\n\n\n\ttype(): BillingInfoValidationRuleType {\n\t\treturn BillingInfoValidationRules.TYPE\n\t}\n\n}\n\n\nexport default BillingInfoValidationRules\n\nexport type { BillingInfoValidationRule, BillingInfoValidationRuleCreate, BillingInfoValidationRuleUpdate, BillingInfoValidationRuleType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Address } from './addresses'\nimport type { Attachment } from './attachments'\n\n\ntype BingGeocoderType = 'bing_geocoders'\ntype BingGeocoderRel = ResourceRel & { type: BingGeocoderType }\n\n\nexport type BingGeocoderSort = Pick<BingGeocoder, 'id' | 'name'> & ResourceSort\n// export type BingGeocoderFilter = Pick<BingGeocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface BingGeocoder extends Resource {\n\t\n\treadonly type: BingGeocoderType\n\n\tname: string\n\n\taddresses?: Address[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\ninterface BingGeocoderCreate extends ResourceCreate {\n\t\n\tname: string\n\tkey: string\n\t\n}\n\n\ninterface BingGeocoderUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tkey?: string | null\n\t\n}\n\n\nclass BingGeocoders extends ApiResource<BingGeocoder> {\n\n\tstatic readonly TYPE: BingGeocoderType = 'bing_geocoders' as const\n\n\tasync create(resource: BingGeocoderCreate, params?: QueryParamsRetrieve<BingGeocoder>, options?: ResourcesConfig): Promise<BingGeocoder> {\n\t\treturn this.resources.create<BingGeocoderCreate, BingGeocoder>({ ...resource, type: BingGeocoders.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BingGeocoderUpdate, params?: QueryParamsRetrieve<BingGeocoder>, options?: ResourcesConfig): Promise<BingGeocoder> {\n\t\treturn this.resources.update<BingGeocoderUpdate, BingGeocoder>({ ...resource, type: BingGeocoders.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: BingGeocoders.TYPE } : id, options)\n\t}\n\n\tasync addresses(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `bing_geocoders/${_bingGeocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(bingGeocoderId: string | BingGeocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _bingGeocoderId = (bingGeocoderId as BingGeocoder).id || bingGeocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `bing_geocoders/${_bingGeocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisBingGeocoder(resource: any): resource is BingGeocoder {\n\t\treturn resource.type && (resource.type === BingGeocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BingGeocoderRel {\n\t\treturn super.relationshipOneToOne<BingGeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BingGeocoderRel[] {\n\t\treturn super.relationshipOneToMany<BingGeocoderRel>(...ids)\n\t}\n\n\n\ttype(): BingGeocoderType {\n\t\treturn BingGeocoders.TYPE\n\t}\n\n}\n\n\nexport default BingGeocoders\n\nexport type { BingGeocoder, BingGeocoderCreate, BingGeocoderUpdate, BingGeocoderType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { BraintreePayment, BraintreePaymentType } from './braintree_payments'\n\n\ntype BraintreeGatewayType = 'braintree_gateways'\ntype BraintreeGatewayRel = ResourceRel & { type: BraintreeGatewayType }\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\n\n\nexport type BraintreeGatewaySort = Pick<BraintreeGateway, 'id' | 'name'> & ResourceSort\n// export type BraintreeGatewayFilter = Pick<BraintreeGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface BraintreeGateway extends Resource {\n\t\n\treadonly type: BraintreeGatewayType\n\n\tname: string\n\tdescriptor_name?: string | null\n\tdescriptor_phone?: string | null\n\tdescriptor_url?: string | null\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tbraintree_payments?: BraintreePayment[] | null\n\n}\n\n\ninterface BraintreeGatewayCreate extends ResourceCreate {\n\t\n\tname: string\n\tmerchant_account_id: string\n\tmerchant_id: string\n\tpublic_key: string\n\tprivate_key: string\n\tdescriptor_name?: string | null\n\tdescriptor_phone?: string | null\n\tdescriptor_url?: string | null\n\n\tbraintree_payments?: BraintreePaymentRel[] | null\n\n}\n\n\ninterface BraintreeGatewayUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tmerchant_account_id?: string | null\n\tmerchant_id?: string | null\n\tpublic_key?: string | null\n\tprivate_key?: string | null\n\tdescriptor_name?: string | null\n\tdescriptor_phone?: string | null\n\tdescriptor_url?: string | null\n\n\tbraintree_payments?: BraintreePaymentRel[] | null\n\n}\n\n\nclass BraintreeGateways extends ApiResource<BraintreeGateway> {\n\n\tstatic readonly TYPE: BraintreeGatewayType = 'braintree_gateways' as const\n\n\tasync create(resource: BraintreeGatewayCreate, params?: QueryParamsRetrieve<BraintreeGateway>, options?: ResourcesConfig): Promise<BraintreeGateway> {\n\t\treturn this.resources.create<BraintreeGatewayCreate, BraintreeGateway>({ ...resource, type: BraintreeGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BraintreeGatewayUpdate, params?: QueryParamsRetrieve<BraintreeGateway>, options?: ResourcesConfig): Promise<BraintreeGateway> {\n\t\treturn this.resources.update<BraintreeGatewayUpdate, BraintreeGateway>({ ...resource, type: BraintreeGateways.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: BraintreeGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `braintree_gateways/${_braintreeGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `braintree_gateways/${_braintreeGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync braintree_payments(braintreeGatewayId: string | BraintreeGateway, params?: QueryParamsList<BraintreePayment>, options?: ResourcesConfig): Promise<ListResponse<BraintreePayment>> {\n\t\tconst _braintreeGatewayId = (braintreeGatewayId as BraintreeGateway).id || braintreeGatewayId as string\n\t\treturn this.resources.fetch<BraintreePayment>({ type: 'braintree_payments' }, `braintree_gateways/${_braintreeGatewayId}/braintree_payments`, params, options) as unknown as ListResponse<BraintreePayment>\n\t}\n\n\n\tisBraintreeGateway(resource: any): resource is BraintreeGateway {\n\t\treturn resource.type && (resource.type === BraintreeGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BraintreeGatewayRel {\n\t\treturn super.relationshipOneToOne<BraintreeGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BraintreeGatewayRel[] {\n\t\treturn super.relationshipOneToMany<BraintreeGatewayRel>(...ids)\n\t}\n\n\n\ttype(): BraintreeGatewayType {\n\t\treturn BraintreeGateways.TYPE\n\t}\n\n}\n\n\nexport default BraintreeGateways\n\nexport type { BraintreeGateway, BraintreeGatewayCreate, BraintreeGatewayUpdate, BraintreeGatewayType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype BraintreePaymentType = 'braintree_payments'\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type BraintreePaymentSort = Pick<BraintreePayment, 'id'> & ResourceSort\n// export type BraintreePaymentFilter = Pick<BraintreePayment, 'id'> & ResourceFilter\n\n\ninterface BraintreePayment extends Resource {\n\t\n\treadonly type: BraintreePaymentType\n\n\tclient_token: string\n\tpayment_method_nonce?: string | null\n\tpayment_id?: string | null\n\tlocal?: boolean | null\n\toptions?: Record<string, any> | null\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface BraintreePaymentCreate extends ResourceCreate {\n\t\n\tpayment_id?: string | null\n\tlocal?: boolean | null\n\toptions?: Record<string, any> | null\n\n\torder: OrderRel\n\n}\n\n\ninterface BraintreePaymentUpdate extends ResourceUpdate {\n\t\n\tpayment_method_nonce?: string | null\n\tpayment_id?: string | null\n\tlocal?: boolean | null\n\toptions?: Record<string, any> | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass BraintreePayments extends ApiResource<BraintreePayment> {\n\n\tstatic readonly TYPE: BraintreePaymentType = 'braintree_payments' as const\n\n\tasync create(resource: BraintreePaymentCreate, params?: QueryParamsRetrieve<BraintreePayment>, options?: ResourcesConfig): Promise<BraintreePayment> {\n\t\treturn this.resources.create<BraintreePaymentCreate, BraintreePayment>({ ...resource, type: BraintreePayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BraintreePaymentUpdate, params?: QueryParamsRetrieve<BraintreePayment>, options?: ResourcesConfig): Promise<BraintreePayment> {\n\t\treturn this.resources.update<BraintreePaymentUpdate, BraintreePayment>({ ...resource, type: BraintreePayments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: BraintreePayments.TYPE } : id, options)\n\t}\n\n\tasync order(braintreePaymentId: string | BraintreePayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _braintreePaymentId = (braintreePaymentId as BraintreePayment).id || braintreePaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `braintree_payments/${_braintreePaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(braintreePaymentId: string | BraintreePayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _braintreePaymentId = (braintreePaymentId as BraintreePayment).id || braintreePaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `braintree_payments/${_braintreePaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(braintreePaymentId: string | BraintreePayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _braintreePaymentId = (braintreePaymentId as BraintreePayment).id || braintreePaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `braintree_payments/${_braintreePaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisBraintreePayment(resource: any): resource is BraintreePayment {\n\t\treturn resource.type && (resource.type === BraintreePayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BraintreePaymentRel {\n\t\treturn super.relationshipOneToOne<BraintreePaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BraintreePaymentRel[] {\n\t\treturn super.relationshipOneToMany<BraintreePaymentRel>(...ids)\n\t}\n\n\n\ttype(): BraintreePaymentType {\n\t\treturn BraintreePayments.TYPE\n\t}\n\n}\n\n\nexport default BraintreePayments\n\nexport type { BraintreePayment, BraintreePaymentCreate, BraintreePaymentUpdate, BraintreePaymentType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Sku } from './skus'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype BundleType = 'bundles'\ntype BundleRel = ResourceRel & { type: BundleType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type BundleSort = Pick<Bundle, 'id' | 'code' | 'currency_code' | 'price_amount_cents' | 'compare_at_amount_cents'> & ResourceSort\n// export type BundleFilter = Pick<Bundle, 'id' | 'code' | 'name' | 'currency_code' | 'description' | 'image_url' | 'do_not_ship' | 'do_not_track' | 'price_amount_cents' | 'compare_at_amount_cents'> & ResourceFilter\n\n\ninterface Bundle extends Resource {\n\t\n\treadonly type: BundleType\n\n\tcode: string\n\tname: string\n\tcurrency_code?: string | null\n\tdescription?: string | null\n\timage_url?: string | null\n\tdo_not_ship?: boolean | null\n\tdo_not_track?: boolean | null\n\tprice_amount_cents?: number | null\n\tprice_amount_float?: number | null\n\tformatted_price_amount?: string | null\n\tcompare_at_amount_cents?: number | null\n\tcompare_at_amount_float?: number | null\n\tformatted_compare_at_amount?: string | null\n\tskus_count?: number | null\n\n\tmarket?: Market | null\n\tsku_list?: SkuList | null\n\tskus?: Sku[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface BundleCreate extends ResourceCreate {\n\t\n\tcode: string\n\tname: string\n\tcurrency_code?: string | null\n\tdescription?: string | null\n\timage_url?: string | null\n\tprice_amount_cents?: number | null\n\tcompare_at_amount_cents?: number | null\n\t_compute_price_amount?: boolean | null\n\t_compute_compare_at_amount?: boolean | null\n\n\tmarket?: MarketRel | null\n\tsku_list: SkuListRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface BundleUpdate extends ResourceUpdate {\n\t\n\tcode?: string | null\n\tname?: string | null\n\tcurrency_code?: string | null\n\tdescription?: string | null\n\timage_url?: string | null\n\tprice_amount_cents?: number | null\n\tcompare_at_amount_cents?: number | null\n\t_compute_price_amount?: boolean | null\n\t_compute_compare_at_amount?: boolean | null\n\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Bundles extends ApiResource<Bundle> {\n\n\tstatic readonly TYPE: BundleType = 'bundles' as const\n\n\tasync create(resource: BundleCreate, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.create<BundleCreate, Bundle>({ ...resource, type: Bundles.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BundleUpdate, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ ...resource, type: Bundles.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Bundles.TYPE } : id, options)\n\t}\n\n\tasync market(bundleId: string | Bundle, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `bundles/${_bundleId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync sku_list(bundleId: string | Bundle, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `bundles/${_bundleId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync skus(bundleId: string | Bundle, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `bundles/${_bundleId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync attachments(bundleId: string | Bundle, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `bundles/${_bundleId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(bundleId: string | Bundle, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `bundles/${_bundleId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(bundleId: string | Bundle, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `bundles/${_bundleId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(bundleId: string | Bundle, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _bundleId = (bundleId as Bundle).id || bundleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `bundles/${_bundleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _compute_price_amount(id: string | Bundle, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _compute_price_amount: true }, params, options)\n\t}\n\n\tasync _compute_compare_at_amount(id: string | Bundle, params?: QueryParamsRetrieve<Bundle>, options?: ResourcesConfig): Promise<Bundle> {\n\t\treturn this.resources.update<BundleUpdate, Bundle>({ id: (typeof id === 'string')? id: id.id, type: Bundles.TYPE, _compute_compare_at_amount: true }, params, options)\n\t}\n\n\n\tisBundle(resource: any): resource is Bundle {\n\t\treturn resource.type && (resource.type === Bundles.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BundleRel {\n\t\treturn super.relationshipOneToOne<BundleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BundleRel[] {\n\t\treturn super.relationshipOneToMany<BundleRel>(...ids)\n\t}\n\n\n\ttype(): BundleType {\n\t\treturn Bundles.TYPE\n\t}\n\n}\n\n\nexport default Bundles\n\nexport type { Bundle, BundleCreate, BundleUpdate, BundleType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { PromotionRule } from './promotion_rules'\nimport type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { Sku } from './skus'\n\n\ntype BuyXPayYPromotionType = 'buy_x_pay_y_promotions'\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type BuyXPayYPromotionSort = Pick<BuyXPayYPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at' | 'x' | 'y'> & ResourceSort\n// export type BuyXPayYPromotionFilter = Pick<BuyXPayYPromotion, 'id' | 'name' | 'currency_code' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at' | 'x' | 'y'> & ResourceFilter\n\n\ninterface BuyXPayYPromotion extends Resource {\n\t\n\treadonly type: BuyXPayYPromotionType\n\n\tname: string\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at: string\n\texpires_at: string\n\ttotal_usage_limit?: number | null\n\ttotal_usage_count?: number | null\n\tactive?: boolean | null\n\tdisabled_at?: string | null\n\tx: number\n\ty: number\n\tcheapest_free?: boolean | null\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface BuyXPayYPromotionCreate extends ResourceCreate {\n\t\n\tname: string\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at: string\n\texpires_at: string\n\ttotal_usage_limit?: number | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\tx: number\n\ty: number\n\tcheapest_free?: boolean | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list: SkuListRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface BuyXPayYPromotionUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at?: string | null\n\texpires_at?: string | null\n\ttotal_usage_limit?: number | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\tx?: number | null\n\ty?: number | null\n\tcheapest_free?: boolean | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass BuyXPayYPromotions extends ApiResource<BuyXPayYPromotion> {\n\n\tstatic readonly TYPE: BuyXPayYPromotionType = 'buy_x_pay_y_promotions' as const\n\n\tasync create(resource: BuyXPayYPromotionCreate, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.create<BuyXPayYPromotionCreate, BuyXPayYPromotion>({ ...resource, type: BuyXPayYPromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: BuyXPayYPromotionUpdate, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ ...resource, type: BuyXPayYPromotions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: BuyXPayYPromotions.TYPE } : id, options)\n\t}\n\n\tasync market(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync skus(buyXPayYPromotionId: string | BuyXPayYPromotion, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _buyXPayYPromotionId = (buyXPayYPromotionId as BuyXPayYPromotion).id || buyXPayYPromotionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `buy_x_pay_y_promotions/${_buyXPayYPromotionId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync _disable(id: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ id: (typeof id === 'string')? id: id.id, type: BuyXPayYPromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | BuyXPayYPromotion, params?: QueryParamsRetrieve<BuyXPayYPromotion>, options?: ResourcesConfig): Promise<BuyXPayYPromotion> {\n\t\treturn this.resources.update<BuyXPayYPromotionUpdate, BuyXPayYPromotion>({ id: (typeof id === 'string')? id: id.id, type: BuyXPayYPromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisBuyXPayYPromotion(resource: any): resource is BuyXPayYPromotion {\n\t\treturn resource.type && (resource.type === BuyXPayYPromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): BuyXPayYPromotionRel {\n\t\treturn super.relationshipOneToOne<BuyXPayYPromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): BuyXPayYPromotionRel[] {\n\t\treturn super.relationshipOneToMany<BuyXPayYPromotionRel>(...ids)\n\t}\n\n\n\ttype(): BuyXPayYPromotionType {\n\t\treturn BuyXPayYPromotions.TYPE\n\t}\n\n}\n\n\nexport default BuyXPayYPromotions\n\nexport type { BuyXPayYPromotion, BuyXPayYPromotionCreate, BuyXPayYPromotionUpdate, BuyXPayYPromotionType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order } from './orders'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { Authorization } from './authorizations'\nimport type { Refund } from './refunds'\n\n\ntype CaptureType = 'captures'\ntype CaptureRel = ResourceRel & { type: CaptureType }\n\n\nexport type CaptureSort = Pick<Capture, 'id' | 'number' | 'amount_cents'> & ResourceSort\n// export type CaptureFilter = Pick<Capture, 'id' | 'number' | 'currency_code' | 'amount_cents' | 'succeeded' | 'message' | 'error_code' | 'error_detail' | 'token' | 'gateway_transaction_id'> & ResourceFilter\n\n\ninterface Capture extends Resource {\n\t\n\treadonly type: CaptureType\n\n\tnumber: string\n\tcurrency_code: string\n\tamount_cents: number\n\tamount_float: number\n\tformatted_amount: string\n\tsucceeded: boolean\n\tmessage?: string | null\n\terror_code?: string | null\n\terror_detail?: string | null\n\ttoken?: string | null\n\tgateway_transaction_id?: string | null\n\trefund_amount_cents?: number | null\n\trefund_amount_float?: number | null\n\tformatted_refund_amount?: string | null\n\trefund_balance_cents?: number | null\n\trefund_balance_float?: number | null\n\tformatted_refund_balance?: string | null\n\n\torder?: Order | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\treference_authorization?: Authorization | null\n\trefunds?: Refund[] | null\n\n}\n\n\ninterface CaptureUpdate extends ResourceUpdate {\n\t\n\t_refund?: boolean | null\n\t_refund_amount_cents?: number | null\n\t\n}\n\n\nclass Captures extends ApiResource<Capture> {\n\n\tstatic readonly TYPE: CaptureType = 'captures' as const\n\n\tasync update(resource: CaptureUpdate, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ ...resource, type: Captures.TYPE }, params, options)\n\t}\n\n\tasync order(captureId: string | Capture, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `captures/${_captureId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(captureId: string | Capture, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `captures/${_captureId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(captureId: string | Capture, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `captures/${_captureId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(captureId: string | Capture, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `captures/${_captureId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync reference_authorization(captureId: string | Capture, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Authorization>({ type: 'authorizations' }, `captures/${_captureId}/reference_authorization`, params, options) as unknown as Authorization\n\t}\n\n\tasync refunds(captureId: string | Capture, params?: QueryParamsList<Refund>, options?: ResourcesConfig): Promise<ListResponse<Refund>> {\n\t\tconst _captureId = (captureId as Capture).id || captureId as string\n\t\treturn this.resources.fetch<Refund>({ type: 'refunds' }, `captures/${_captureId}/refunds`, params, options) as unknown as ListResponse<Refund>\n\t}\n\n\tasync _refund(id: string | Capture, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _refund: true }, params, options)\n\t}\n\n\tasync _refund_amount_cents(id: string | Capture, triggerValue: number, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\treturn this.resources.update<CaptureUpdate, Capture>({ id: (typeof id === 'string')? id: id.id, type: Captures.TYPE, _refund_amount_cents: triggerValue }, params, options)\n\t}\n\n\n\tisCapture(resource: any): resource is Capture {\n\t\treturn resource.type && (resource.type === Captures.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CaptureRel {\n\t\treturn super.relationshipOneToOne<CaptureRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CaptureRel[] {\n\t\treturn super.relationshipOneToMany<CaptureRel>(...ids)\n\t}\n\n\n\ttype(): CaptureType {\n\t\treturn Captures.TYPE\n\t}\n\n}\n\n\nexport default Captures\n\nexport type { Capture, CaptureUpdate, CaptureType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype CarrierAccountType = 'carrier_accounts'\ntype CarrierAccountRel = ResourceRel & { type: CarrierAccountType }\n\n\nexport type CarrierAccountSort = Pick<CarrierAccount, 'id'> & ResourceSort\n// export type CarrierAccountFilter = Pick<CarrierAccount, 'id' | 'name' | 'easypost_type'> & ResourceFilter\n\n\ninterface CarrierAccount extends Resource {\n\t\n\treadonly type: CarrierAccountType\n\n\tname?: string | null\n\teasypost_type?: string | null\n\teasypost_id?: string | null\n\n\tmarket?: Market | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass CarrierAccounts extends ApiResource<CarrierAccount> {\n\n\tstatic readonly TYPE: CarrierAccountType = 'carrier_accounts' as const\n\n\tasync market(carrierAccountId: string | CarrierAccount, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `carrier_accounts/${_carrierAccountId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync attachments(carrierAccountId: string | CarrierAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `carrier_accounts/${_carrierAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(carrierAccountId: string | CarrierAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _carrierAccountId = (carrierAccountId as CarrierAccount).id || carrierAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `carrier_accounts/${_carrierAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCarrierAccount(resource: any): resource is CarrierAccount {\n\t\treturn resource.type && (resource.type === CarrierAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CarrierAccountRel {\n\t\treturn super.relationshipOneToOne<CarrierAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CarrierAccountRel[] {\n\t\treturn super.relationshipOneToMany<CarrierAccountRel>(...ids)\n\t}\n\n\n\ttype(): CarrierAccountType {\n\t\treturn CarrierAccounts.TYPE\n\t}\n\n}\n\n\nexport default CarrierAccounts\n\nexport type { CarrierAccount, CarrierAccountType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments'\n\n\ntype CheckoutComGatewayType = 'checkout_com_gateways'\ntype CheckoutComGatewayRel = ResourceRel & { type: CheckoutComGatewayType }\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\n\n\nexport type CheckoutComGatewaySort = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceSort\n// export type CheckoutComGatewayFilter = Pick<CheckoutComGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface CheckoutComGateway extends Resource {\n\t\n\treadonly type: CheckoutComGatewayType\n\n\tname: string\n\twebhook_endpoint_id?: string | null\n\twebhook_endpoint_secret?: string | null\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tcheckout_com_payments?: CheckoutComPayment[] | null\n\n}\n\n\ninterface CheckoutComGatewayCreate extends ResourceCreate {\n\t\n\tname: string\n\tsecret_key: string\n\tpublic_key: string\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\ninterface CheckoutComGatewayUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tsecret_key?: string | null\n\tpublic_key?: string | null\n\n\tcheckout_com_payments?: CheckoutComPaymentRel[] | null\n\n}\n\n\nclass CheckoutComGateways extends ApiResource<CheckoutComGateway> {\n\n\tstatic readonly TYPE: CheckoutComGatewayType = 'checkout_com_gateways' as const\n\n\tasync create(resource: CheckoutComGatewayCreate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.create<CheckoutComGatewayCreate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CheckoutComGatewayUpdate, params?: QueryParamsRetrieve<CheckoutComGateway>, options?: ResourcesConfig): Promise<CheckoutComGateway> {\n\t\treturn this.resources.update<CheckoutComGatewayUpdate, CheckoutComGateway>({ ...resource, type: CheckoutComGateways.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: CheckoutComGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `checkout_com_gateways/${_checkoutComGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `checkout_com_gateways/${_checkoutComGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync checkout_com_payments(checkoutComGatewayId: string | CheckoutComGateway, params?: QueryParamsList<CheckoutComPayment>, options?: ResourcesConfig): Promise<ListResponse<CheckoutComPayment>> {\n\t\tconst _checkoutComGatewayId = (checkoutComGatewayId as CheckoutComGateway).id || checkoutComGatewayId as string\n\t\treturn this.resources.fetch<CheckoutComPayment>({ type: 'checkout_com_payments' }, `checkout_com_gateways/${_checkoutComGatewayId}/checkout_com_payments`, params, options) as unknown as ListResponse<CheckoutComPayment>\n\t}\n\n\n\tisCheckoutComGateway(resource: any): resource is CheckoutComGateway {\n\t\treturn resource.type && (resource.type === CheckoutComGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CheckoutComGatewayRel {\n\t\treturn super.relationshipOneToOne<CheckoutComGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CheckoutComGatewayRel[] {\n\t\treturn super.relationshipOneToMany<CheckoutComGatewayRel>(...ids)\n\t}\n\n\n\ttype(): CheckoutComGatewayType {\n\t\treturn CheckoutComGateways.TYPE\n\t}\n\n}\n\n\nexport default CheckoutComGateways\n\nexport type { CheckoutComGateway, CheckoutComGatewayCreate, CheckoutComGatewayUpdate, CheckoutComGatewayType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype CheckoutComPaymentType = 'checkout_com_payments'\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type CheckoutComPaymentSort = Pick<CheckoutComPayment, 'id'> & ResourceSort\n// export type CheckoutComPaymentFilter = Pick<CheckoutComPayment, 'id'> & ResourceFilter\n\n\ninterface CheckoutComPayment extends Resource {\n\t\n\treadonly type: CheckoutComPaymentType\n\n\tpublic_key?: string | null\n\tpayment_type: string\n\ttoken: string\n\tsession_id?: string | null\n\tsuccess_url?: string | null\n\tfailure_url?: string | null\n\tsource_id?: string | null\n\tcustomer_token?: string | null\n\tredirect_uri?: string | null\n\tpayment_response?: Record<string, any> | null\n\tmismatched_amounts?: boolean | null\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CheckoutComPaymentCreate extends ResourceCreate {\n\t\n\tpayment_type: string\n\ttoken: string\n\tsession_id?: string | null\n\tsuccess_url?: string | null\n\tfailure_url?: string | null\n\n\torder: OrderRel\n\n}\n\n\ninterface CheckoutComPaymentUpdate extends ResourceUpdate {\n\t\n\tpayment_type?: string | null\n\ttoken?: string | null\n\tsession_id?: string | null\n\tsuccess_url?: string | null\n\tfailure_url?: string | null\n\t_details?: boolean | null\n\t_refresh?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass CheckoutComPayments extends ApiResource<CheckoutComPayment> {\n\n\tstatic readonly TYPE: CheckoutComPaymentType = 'checkout_com_payments' as const\n\n\tasync create(resource: CheckoutComPaymentCreate, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.create<CheckoutComPaymentCreate, CheckoutComPayment>({ ...resource, type: CheckoutComPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CheckoutComPaymentUpdate, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.update<CheckoutComPaymentUpdate, CheckoutComPayment>({ ...resource, type: CheckoutComPayments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: CheckoutComPayments.TYPE } : id, options)\n\t}\n\n\tasync order(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _checkoutComPaymentId = (checkoutComPaymentId as CheckoutComPayment).id || checkoutComPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `checkout_com_payments/${_checkoutComPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _checkoutComPaymentId = (checkoutComPaymentId as CheckoutComPayment).id || checkoutComPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `checkout_com_payments/${_checkoutComPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(checkoutComPaymentId: string | CheckoutComPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _checkoutComPaymentId = (checkoutComPaymentId as CheckoutComPayment).id || checkoutComPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `checkout_com_payments/${_checkoutComPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _details(id: string | CheckoutComPayment, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.update<CheckoutComPaymentUpdate, CheckoutComPayment>({ id: (typeof id === 'string')? id: id.id, type: CheckoutComPayments.TYPE, _details: true }, params, options)\n\t}\n\n\tasync _refresh(id: string | CheckoutComPayment, params?: QueryParamsRetrieve<CheckoutComPayment>, options?: ResourcesConfig): Promise<CheckoutComPayment> {\n\t\treturn this.resources.update<CheckoutComPaymentUpdate, CheckoutComPayment>({ id: (typeof id === 'string')? id: id.id, type: CheckoutComPayments.TYPE, _refresh: true }, params, options)\n\t}\n\n\n\tisCheckoutComPayment(resource: any): resource is CheckoutComPayment {\n\t\treturn resource.type && (resource.type === CheckoutComPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CheckoutComPaymentRel {\n\t\treturn super.relationshipOneToOne<CheckoutComPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CheckoutComPaymentRel[] {\n\t\treturn super.relationshipOneToMany<CheckoutComPaymentRel>(...ids)\n\t}\n\n\n\ttype(): CheckoutComPaymentType {\n\t\treturn CheckoutComPayments.TYPE\n\t}\n\n}\n\n\nexport default CheckoutComPayments\n\nexport type { CheckoutComPayment, CheckoutComPaymentCreate, CheckoutComPaymentUpdate, CheckoutComPaymentType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype CleanupType = 'cleanups'\ntype CleanupRel = ResourceRel & { type: CleanupType }\n\n\nexport type CleanupSort = Pick<Cleanup, 'id' | 'resource_type' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'records_count' | 'errors_count' | 'processed_count'> & ResourceSort\n// export type CleanupFilter = Pick<Cleanup, 'id' | 'resource_type' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'records_count' | 'errors_count' | 'processed_count'> & ResourceFilter\n\n\ninterface Cleanup extends Resource {\n\t\n\treadonly type: CleanupType\n\n\tresource_type: string\n\tstatus: 'pending' | 'in_progress' | 'interrupted' | 'completed'\n\tstarted_at?: string | null\n\tcompleted_at?: string | null\n\tinterrupted_at?: string | null\n\tfilters?: Record<string, any> | null\n\trecords_count?: number | null\n\terrors_count?: number | null\n\tprocessed_count?: number | null\n\terrors_log?: Record<string, any> | null\n\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CleanupCreate extends ResourceCreate {\n\t\n\tresource_type: string\n\tfilters?: Record<string, any> | null\n\t\n}\n\n\nclass Cleanups extends ApiResource<Cleanup> {\n\n\tstatic readonly TYPE: CleanupType = 'cleanups' as const\n\n\tasync create(resource: CleanupCreate, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup> {\n\t\treturn this.resources.create<CleanupCreate, Cleanup>({ ...resource, type: Cleanups.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Cleanups.TYPE } : id, options)\n\t}\n\n\tasync events(cleanupId: string | Cleanup, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _cleanupId = (cleanupId as Cleanup).id || cleanupId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `cleanups/${_cleanupId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(cleanupId: string | Cleanup, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _cleanupId = (cleanupId as Cleanup).id || cleanupId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `cleanups/${_cleanupId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCleanup(resource: any): resource is Cleanup {\n\t\treturn resource.type && (resource.type === Cleanups.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CleanupRel {\n\t\treturn super.relationshipOneToOne<CleanupRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CleanupRel[] {\n\t\treturn super.relationshipOneToMany<CleanupRel>(...ids)\n\t}\n\n\n\ttype(): CleanupType {\n\t\treturn Cleanups.TYPE\n\t}\n\n}\n\n\nexport default Cleanups\n\nexport type { Cleanup, CleanupCreate, CleanupType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions'\nimport type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { Version } from './versions'\nimport type { Coupon, CouponType } from './coupons'\n\n\ntype CouponCodesPromotionRuleType = 'coupon_codes_promotion_rules'\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype CouponRel = ResourceRel & { type: CouponType }\n\n\nexport type CouponCodesPromotionRuleSort = Pick<CouponCodesPromotionRule, 'id'> & ResourceSort\n// export type CouponCodesPromotionRuleFilter = Pick<CouponCodesPromotionRule, 'id'> & ResourceFilter\n\n\ninterface CouponCodesPromotionRule extends Resource {\n\t\n\treadonly type: CouponCodesPromotionRuleType\n\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | null\n\tversions?: Version[] | null\n\tcoupons?: Coupon[] | null\n\n}\n\n\ninterface CouponCodesPromotionRuleCreate extends ResourceCreate {\n\t\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel\n\tcoupons?: CouponRel[] | null\n\n}\n\n\ninterface CouponCodesPromotionRuleUpdate extends ResourceUpdate {\n\t\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | null\n\tcoupons?: CouponRel[] | null\n\n}\n\n\nclass CouponCodesPromotionRules extends ApiResource<CouponCodesPromotionRule> {\n\n\tstatic readonly TYPE: CouponCodesPromotionRuleType = 'coupon_codes_promotion_rules' as const\n\n\tasync create(resource: CouponCodesPromotionRuleCreate, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\treturn this.resources.create<CouponCodesPromotionRuleCreate, CouponCodesPromotionRule>({ ...resource, type: CouponCodesPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CouponCodesPromotionRuleUpdate, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\treturn this.resources.update<CouponCodesPromotionRuleUpdate, CouponCodesPromotionRule>({ ...resource, type: CouponCodesPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: CouponCodesPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(couponCodesPromotionRuleId: string | CouponCodesPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _couponCodesPromotionRuleId = (couponCodesPromotionRuleId as CouponCodesPromotionRule).id || couponCodesPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `coupon_codes_promotion_rules/${_couponCodesPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync coupons(couponCodesPromotionRuleId: string | CouponCodesPromotionRule, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _couponCodesPromotionRuleId = (couponCodesPromotionRuleId as CouponCodesPromotionRule).id || couponCodesPromotionRuleId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `coupon_codes_promotion_rules/${_couponCodesPromotionRuleId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\n\tisCouponCodesPromotionRule(resource: any): resource is CouponCodesPromotionRule {\n\t\treturn resource.type && (resource.type === CouponCodesPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CouponCodesPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<CouponCodesPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CouponCodesPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<CouponCodesPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): CouponCodesPromotionRuleType {\n\t\treturn CouponCodesPromotionRules.TYPE\n\t}\n\n}\n\n\nexport default CouponCodesPromotionRules\n\nexport type { CouponCodesPromotionRule, CouponCodesPromotionRuleCreate, CouponCodesPromotionRuleUpdate, CouponCodesPromotionRuleType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Customer, CustomerType } from './customers'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype CouponRecipientType = 'coupon_recipients'\ntype CouponRecipientRel = ResourceRel & { type: CouponRecipientType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\n\n\nexport type CouponRecipientSort = Pick<CouponRecipient, 'id'> & ResourceSort\n// export type CouponRecipientFilter = Pick<CouponRecipient, 'id' | 'email' | 'first_name' | 'last_name'> & ResourceFilter\n\n\ninterface CouponRecipient extends Resource {\n\t\n\treadonly type: CouponRecipientType\n\n\temail: string\n\tfirst_name?: string | null\n\tlast_name?: string | null\n\n\tcustomer?: Customer | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CouponRecipientCreate extends ResourceCreate {\n\t\n\temail: string\n\tfirst_name?: string | null\n\tlast_name?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\ninterface CouponRecipientUpdate extends ResourceUpdate {\n\t\n\temail?: string | null\n\tfirst_name?: string | null\n\tlast_name?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\nclass CouponRecipients extends ApiResource<CouponRecipient> {\n\n\tstatic readonly TYPE: CouponRecipientType = 'coupon_recipients' as const\n\n\tasync create(resource: CouponRecipientCreate, params?: QueryParamsRetrieve<CouponRecipient>, options?: ResourcesConfig): Promise<CouponRecipient> {\n\t\treturn this.resources.create<CouponRecipientCreate, CouponRecipient>({ ...resource, type: CouponRecipients.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CouponRecipientUpdate, params?: QueryParamsRetrieve<CouponRecipient>, options?: ResourcesConfig): Promise<CouponRecipient> {\n\t\treturn this.resources.update<CouponRecipientUpdate, CouponRecipient>({ ...resource, type: CouponRecipients.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: CouponRecipients.TYPE } : id, options)\n\t}\n\n\tasync customer(couponRecipientId: string | CouponRecipient, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _couponRecipientId = (couponRecipientId as CouponRecipient).id || couponRecipientId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `coupon_recipients/${_couponRecipientId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync attachments(couponRecipientId: string | CouponRecipient, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _couponRecipientId = (couponRecipientId as CouponRecipient).id || couponRecipientId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `coupon_recipients/${_couponRecipientId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(couponRecipientId: string | CouponRecipient, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _couponRecipientId = (couponRecipientId as CouponRecipient).id || couponRecipientId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `coupon_recipients/${_couponRecipientId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCouponRecipient(resource: any): resource is CouponRecipient {\n\t\treturn resource.type && (resource.type === CouponRecipients.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CouponRecipientRel {\n\t\treturn super.relationshipOneToOne<CouponRecipientRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CouponRecipientRel[] {\n\t\treturn super.relationshipOneToMany<CouponRecipientRel>(...ids)\n\t}\n\n\n\ttype(): CouponRecipientType {\n\t\treturn CouponRecipients.TYPE\n\t}\n\n}\n\n\nexport default CouponRecipients\n\nexport type { CouponRecipient, CouponRecipientCreate, CouponRecipientUpdate, CouponRecipientType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CouponRecipient, CouponRecipientType } from './coupon_recipients'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype CouponType = 'coupons'\ntype CouponRel = ResourceRel & { type: CouponType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CouponRecipientRel = ResourceRel & { type: CouponRecipientType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type CouponSort = Pick<Coupon, 'id' | 'code' | 'customer_single_use' | 'usage_limit' | 'usage_count' | 'expires_at'> & ResourceSort\n// export type CouponFilter = Pick<Coupon, 'id' | 'code' | 'customer_single_use' | 'usage_limit' | 'usage_count' | 'expires_at'> & ResourceFilter\n\n\ninterface Coupon extends Resource {\n\t\n\treadonly type: CouponType\n\n\tcode: string\n\tcustomer_single_use?: boolean | null\n\tusage_limit?: number | null\n\tusage_count?: number | null\n\trecipient_email?: string | null\n\texpires_at?: string | null\n\n\tpromotion_rule?: CouponCodesPromotionRule | null\n\tcoupon_recipient?: CouponRecipient | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CouponCreate extends ResourceCreate {\n\t\n\tcode: string\n\tcustomer_single_use?: boolean | null\n\tusage_limit?: number | null\n\trecipient_email?: string | null\n\texpires_at?: string | null\n\n\tpromotion_rule: CouponCodesPromotionRuleRel\n\tcoupon_recipient?: CouponRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface CouponUpdate extends ResourceUpdate {\n\t\n\tcode?: string | null\n\tcustomer_single_use?: boolean | null\n\tusage_limit?: number | null\n\trecipient_email?: string | null\n\texpires_at?: string | null\n\n\tpromotion_rule?: CouponCodesPromotionRuleRel | null\n\tcoupon_recipient?: CouponRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Coupons extends ApiResource<Coupon> {\n\n\tstatic readonly TYPE: CouponType = 'coupons' as const\n\n\tasync create(resource: CouponCreate, params?: QueryParamsRetrieve<Coupon>, options?: ResourcesConfig): Promise<Coupon> {\n\t\treturn this.resources.create<CouponCreate, Coupon>({ ...resource, type: Coupons.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CouponUpdate, params?: QueryParamsRetrieve<Coupon>, options?: ResourcesConfig): Promise<Coupon> {\n\t\treturn this.resources.update<CouponUpdate, Coupon>({ ...resource, type: Coupons.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Coupons.TYPE } : id, options)\n\t}\n\n\tasync promotion_rule(couponId: string | Coupon, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `coupons/${_couponId}/promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync coupon_recipient(couponId: string | Coupon, params?: QueryParamsRetrieve<CouponRecipient>, options?: ResourcesConfig): Promise<CouponRecipient> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<CouponRecipient>({ type: 'coupon_recipients' }, `coupons/${_couponId}/coupon_recipient`, params, options) as unknown as CouponRecipient\n\t}\n\n\tasync events(couponId: string | Coupon, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `coupons/${_couponId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(couponId: string | Coupon, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `coupons/${_couponId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(couponId: string | Coupon, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _couponId = (couponId as Coupon).id || couponId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `coupons/${_couponId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCoupon(resource: any): resource is Coupon {\n\t\treturn resource.type && (resource.type === Coupons.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CouponRel {\n\t\treturn super.relationshipOneToOne<CouponRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CouponRel[] {\n\t\treturn super.relationshipOneToMany<CouponRel>(...ids)\n\t}\n\n\n\ttype(): CouponType {\n\t\treturn Coupons.TYPE\n\t}\n\n}\n\n\nexport default Coupons\n\nexport type { Coupon, CouponCreate, CouponUpdate, CouponType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions'\nimport type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { Version } from './versions'\n\n\ntype CustomPromotionRuleType = 'custom_promotion_rules'\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\n\n\nexport type CustomPromotionRuleSort = Pick<CustomPromotionRule, 'id'> & ResourceSort\n// export type CustomPromotionRuleFilter = Pick<CustomPromotionRule, 'id'> & ResourceFilter\n\n\ninterface CustomPromotionRule extends Resource {\n\t\n\treadonly type: CustomPromotionRuleType\n\n\tfilters?: Record<string, any> | null\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomPromotionRuleCreate extends ResourceCreate {\n\t\n\tfilters?: Record<string, any> | null\n\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel\n\n}\n\n\ninterface CustomPromotionRuleUpdate extends ResourceUpdate {\n\t\n\tfilters?: Record<string, any> | null\n\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | null\n\n}\n\n\nclass CustomPromotionRules extends ApiResource<CustomPromotionRule> {\n\n\tstatic readonly TYPE: CustomPromotionRuleType = 'custom_promotion_rules' as const\n\n\tasync create(resource: CustomPromotionRuleCreate, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\treturn this.resources.create<CustomPromotionRuleCreate, CustomPromotionRule>({ ...resource, type: CustomPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomPromotionRuleUpdate, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\treturn this.resources.update<CustomPromotionRuleUpdate, CustomPromotionRule>({ ...resource, type: CustomPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: CustomPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(customPromotionRuleId: string | CustomPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customPromotionRuleId = (customPromotionRuleId as CustomPromotionRule).id || customPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `custom_promotion_rules/${_customPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomPromotionRule(resource: any): resource is CustomPromotionRule {\n\t\treturn resource.type && (resource.type === CustomPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<CustomPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<CustomPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): CustomPromotionRuleType {\n\t\treturn CustomPromotionRules.TYPE\n\t}\n\n}\n\n\nexport default CustomPromotionRules\n\nexport type { CustomPromotionRule, CustomPromotionRuleCreate, CustomPromotionRuleUpdate, CustomPromotionRuleType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Customer, CustomerType } from './customers'\nimport type { Address, AddressType } from './addresses'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype CustomerAddressType = 'customer_addresses'\ntype CustomerAddressRel = ResourceRel & { type: CustomerAddressType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype AddressRel = ResourceRel & { type: AddressType }\n\n\nexport type CustomerAddressSort = Pick<CustomerAddress, 'id'> & ResourceSort\n// export type CustomerAddressFilter = Pick<CustomerAddress, 'id'> & ResourceFilter\n\n\ninterface CustomerAddress extends Resource {\n\t\n\treadonly type: CustomerAddressType\n\n\tname?: string | null\n\tcustomer_email: string\n\n\tcustomer?: Customer | null\n\taddress?: Address | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerAddressCreate extends ResourceCreate {\n\t\n\tcustomer_email: string\n\n\tcustomer: CustomerRel\n\taddress: AddressRel\n\n}\n\n\ninterface CustomerAddressUpdate extends ResourceUpdate {\n\t\n\tcustomer?: CustomerRel | null\n\taddress?: AddressRel | null\n\n}\n\n\nclass CustomerAddresses extends ApiResource<CustomerAddress> {\n\n\tstatic readonly TYPE: CustomerAddressType = 'customer_addresses' as const\n\n\tasync create(resource: CustomerAddressCreate, params?: QueryParamsRetrieve<CustomerAddress>, options?: ResourcesConfig): Promise<CustomerAddress> {\n\t\treturn this.resources.create<CustomerAddressCreate, CustomerAddress>({ ...resource, type: CustomerAddresses.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerAddressUpdate, params?: QueryParamsRetrieve<CustomerAddress>, options?: ResourcesConfig): Promise<CustomerAddress> {\n\t\treturn this.resources.update<CustomerAddressUpdate, CustomerAddress>({ ...resource, type: CustomerAddresses.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: CustomerAddresses.TYPE } : id, options)\n\t}\n\n\tasync customer(customerAddressId: string | CustomerAddress, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_addresses/${_customerAddressId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync address(customerAddressId: string | CustomerAddress, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `customer_addresses/${_customerAddressId}/address`, params, options) as unknown as Address\n\t}\n\n\tasync events(customerAddressId: string | CustomerAddress, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customer_addresses/${_customerAddressId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(customerAddressId: string | CustomerAddress, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerAddressId = (customerAddressId as CustomerAddress).id || customerAddressId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_addresses/${_customerAddressId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerAddress(resource: any): resource is CustomerAddress {\n\t\treturn resource.type && (resource.type === CustomerAddresses.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerAddressRel {\n\t\treturn super.relationshipOneToOne<CustomerAddressRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerAddressRel[] {\n\t\treturn super.relationshipOneToMany<CustomerAddressRel>(...ids)\n\t}\n\n\n\ttype(): CustomerAddressType {\n\t\treturn CustomerAddresses.TYPE\n\t}\n\n}\n\n\nexport default CustomerAddresses\n\nexport type { CustomerAddress, CustomerAddressCreate, CustomerAddressUpdate, CustomerAddressType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Customer } from './customers'\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype CustomerGroupType = 'customer_groups'\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\n\n\nexport type CustomerGroupSort = Pick<CustomerGroup, 'id' | 'name'> & ResourceSort\n// export type CustomerGroupFilter = Pick<CustomerGroup, 'id' | 'name'> & ResourceFilter\n\n\ninterface CustomerGroup extends Resource {\n\t\n\treadonly type: CustomerGroupType\n\n\tname: string\n\n\tcustomers?: Customer[] | null\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerGroupCreate extends ResourceCreate {\n\t\n\tname: string\n\t\n}\n\n\ninterface CustomerGroupUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\t\n}\n\n\nclass CustomerGroups extends ApiResource<CustomerGroup> {\n\n\tstatic readonly TYPE: CustomerGroupType = 'customer_groups' as const\n\n\tasync create(resource: CustomerGroupCreate, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\treturn this.resources.create<CustomerGroupCreate, CustomerGroup>({ ...resource, type: CustomerGroups.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerGroupUpdate, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\treturn this.resources.update<CustomerGroupUpdate, CustomerGroup>({ ...resource, type: CustomerGroups.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: CustomerGroups.TYPE } : id, options)\n\t}\n\n\tasync customers(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Customer>, options?: ResourcesConfig): Promise<ListResponse<Customer>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_groups/${_customerGroupId}/customers`, params, options) as unknown as ListResponse<Customer>\n\t}\n\n\tasync markets(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `customer_groups/${_customerGroupId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `customer_groups/${_customerGroupId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(customerGroupId: string | CustomerGroup, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerGroupId = (customerGroupId as CustomerGroup).id || customerGroupId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_groups/${_customerGroupId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerGroup(resource: any): resource is CustomerGroup {\n\t\treturn resource.type && (resource.type === CustomerGroups.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerGroupRel {\n\t\treturn super.relationshipOneToOne<CustomerGroupRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerGroupRel[] {\n\t\treturn super.relationshipOneToMany<CustomerGroupRel>(...ids)\n\t}\n\n\n\ttype(): CustomerGroupType {\n\t\treturn CustomerGroups.TYPE\n\t}\n\n}\n\n\nexport default CustomerGroups\n\nexport type { CustomerGroup, CustomerGroupCreate, CustomerGroupUpdate, CustomerGroupType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Customer } from './customers'\nimport type { Event } from './events'\n\n\ntype CustomerPasswordResetType = 'customer_password_resets'\ntype CustomerPasswordResetRel = ResourceRel & { type: CustomerPasswordResetType }\n\n\nexport type CustomerPasswordResetSort = Pick<CustomerPasswordReset, 'id'> & ResourceSort\n// export type CustomerPasswordResetFilter = Pick<CustomerPasswordReset, 'id' | 'reset_password_token' | 'reset_password_at'> & ResourceFilter\n\n\ninterface CustomerPasswordReset extends Resource {\n\t\n\treadonly type: CustomerPasswordResetType\n\n\tcustomer_email: string\n\treset_password_token?: string | null\n\treset_password_at?: string | null\n\n\tcustomer?: Customer | null\n\tevents?: Event[] | null\n\n}\n\n\ninterface CustomerPasswordResetCreate extends ResourceCreate {\n\t\n\tcustomer_email: string\n\t\n}\n\n\ninterface CustomerPasswordResetUpdate extends ResourceUpdate {\n\t\n\tcustomer_password?: string | null\n\t_reset_password_token?: string | null\n\t\n}\n\n\nclass CustomerPasswordResets extends ApiResource<CustomerPasswordReset> {\n\n\tstatic readonly TYPE: CustomerPasswordResetType = 'customer_password_resets' as const\n\n\tasync create(resource: CustomerPasswordResetCreate, params?: QueryParamsRetrieve<CustomerPasswordReset>, options?: ResourcesConfig): Promise<CustomerPasswordReset> {\n\t\treturn this.resources.create<CustomerPasswordResetCreate, CustomerPasswordReset>({ ...resource, type: CustomerPasswordResets.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerPasswordResetUpdate, params?: QueryParamsRetrieve<CustomerPasswordReset>, options?: ResourcesConfig): Promise<CustomerPasswordReset> {\n\t\treturn this.resources.update<CustomerPasswordResetUpdate, CustomerPasswordReset>({ ...resource, type: CustomerPasswordResets.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: CustomerPasswordResets.TYPE } : id, options)\n\t}\n\n\tasync customer(customerPasswordResetId: string | CustomerPasswordReset, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerPasswordResetId = (customerPasswordResetId as CustomerPasswordReset).id || customerPasswordResetId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_password_resets/${_customerPasswordResetId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync events(customerPasswordResetId: string | CustomerPasswordReset, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerPasswordResetId = (customerPasswordResetId as CustomerPasswordReset).id || customerPasswordResetId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customer_password_resets/${_customerPasswordResetId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync _reset_password_token(id: string | CustomerPasswordReset, triggerValue: string, params?: QueryParamsRetrieve<CustomerPasswordReset>, options?: ResourcesConfig): Promise<CustomerPasswordReset> {\n\t\treturn this.resources.update<CustomerPasswordResetUpdate, CustomerPasswordReset>({ id: (typeof id === 'string')? id: id.id, type: CustomerPasswordResets.TYPE, _reset_password_token: triggerValue }, params, options)\n\t}\n\n\n\tisCustomerPasswordReset(resource: any): resource is CustomerPasswordReset {\n\t\treturn resource.type && (resource.type === CustomerPasswordResets.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerPasswordResetRel {\n\t\treturn super.relationshipOneToOne<CustomerPasswordResetRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerPasswordResetRel[] {\n\t\treturn super.relationshipOneToMany<CustomerPasswordResetRel>(...ids)\n\t}\n\n\n\ttype(): CustomerPasswordResetType {\n\t\treturn CustomerPasswordResets.TYPE\n\t}\n\n}\n\n\nexport default CustomerPasswordResets\n\nexport type { CustomerPasswordReset, CustomerPasswordResetCreate, CustomerPasswordResetUpdate, CustomerPasswordResetType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Customer, CustomerType } from './customers'\nimport type { PaymentMethod, PaymentMethodType } from './payment_methods'\nimport type { AdyenPayment, AdyenPaymentType } from './adyen_payments'\nimport type { AxervePayment, AxervePaymentType } from './axerve_payments'\nimport type { BraintreePayment, BraintreePaymentType } from './braintree_payments'\nimport type { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments'\nimport type { ExternalPayment, ExternalPaymentType } from './external_payments'\nimport type { KlarnaPayment, KlarnaPaymentType } from './klarna_payments'\nimport type { SatispayPayment, SatispayPaymentType } from './satispay_payments'\nimport type { StripePayment, StripePaymentType } from './stripe_payments'\nimport type { Version } from './versions'\n\n\ntype CustomerPaymentSourceType = 'customer_payment_sources'\ntype CustomerPaymentSourceRel = ResourceRel & { type: CustomerPaymentSourceType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\ntype AdyenPaymentRel = ResourceRel & { type: AdyenPaymentType }\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\ntype ExternalPaymentRel = ResourceRel & { type: ExternalPaymentType }\ntype KlarnaPaymentRel = ResourceRel & { type: KlarnaPaymentType }\ntype SatispayPaymentRel = ResourceRel & { type: SatispayPaymentType }\ntype StripePaymentRel = ResourceRel & { type: StripePaymentType }\n\n\nexport type CustomerPaymentSourceSort = Pick<CustomerPaymentSource, 'id'> & ResourceSort\n// export type CustomerPaymentSourceFilter = Pick<CustomerPaymentSource, 'id' | 'name' | 'payment_source_token'> & ResourceFilter\n\n\ninterface CustomerPaymentSource extends Resource {\n\t\n\treadonly type: CustomerPaymentSourceType\n\n\tname?: string | null\n\tcustomer_token?: string | null\n\tpayment_source_token?: string | null\n\n\tcustomer?: Customer | null\n\tpayment_method?: PaymentMethod | null\n\tpayment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | SatispayPayment | StripePayment | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerPaymentSourceCreate extends ResourceCreate {\n\t\n\tcustomer_token?: string | null\n\tpayment_source_token?: string | null\n\n\tcustomer: CustomerRel\n\tpayment_method?: PaymentMethodRel | null\n\tpayment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | SatispayPaymentRel | StripePaymentRel | null\n\n}\n\n\ninterface CustomerPaymentSourceUpdate extends ResourceUpdate {\n\t\n\tcustomer_token?: string | null\n\tpayment_source_token?: string | null\n\n\tcustomer?: CustomerRel | null\n\tpayment_method?: PaymentMethodRel | null\n\tpayment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | SatispayPaymentRel | StripePaymentRel | null\n\n}\n\n\nclass CustomerPaymentSources extends ApiResource<CustomerPaymentSource> {\n\n\tstatic readonly TYPE: CustomerPaymentSourceType = 'customer_payment_sources' as const\n\n\tasync create(resource: CustomerPaymentSourceCreate, params?: QueryParamsRetrieve<CustomerPaymentSource>, options?: ResourcesConfig): Promise<CustomerPaymentSource> {\n\t\treturn this.resources.create<CustomerPaymentSourceCreate, CustomerPaymentSource>({ ...resource, type: CustomerPaymentSources.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerPaymentSourceUpdate, params?: QueryParamsRetrieve<CustomerPaymentSource>, options?: ResourcesConfig): Promise<CustomerPaymentSource> {\n\t\treturn this.resources.update<CustomerPaymentSourceUpdate, CustomerPaymentSource>({ ...resource, type: CustomerPaymentSources.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: CustomerPaymentSources.TYPE } : id, options)\n\t}\n\n\tasync customer(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerPaymentSourceId = (customerPaymentSourceId as CustomerPaymentSource).id || customerPaymentSourceId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_payment_sources/${_customerPaymentSourceId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync payment_method(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\tconst _customerPaymentSourceId = (customerPaymentSourceId as CustomerPaymentSource).id || customerPaymentSourceId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `customer_payment_sources/${_customerPaymentSourceId}/payment_method`, params, options) as unknown as PaymentMethod\n\t}\n\n\tasync versions(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerPaymentSourceId = (customerPaymentSourceId as CustomerPaymentSource).id || customerPaymentSourceId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_payment_sources/${_customerPaymentSourceId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerPaymentSource(resource: any): resource is CustomerPaymentSource {\n\t\treturn resource.type && (resource.type === CustomerPaymentSources.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerPaymentSourceRel {\n\t\treturn super.relationshipOneToOne<CustomerPaymentSourceRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerPaymentSourceRel[] {\n\t\treturn super.relationshipOneToMany<CustomerPaymentSourceRel>(...ids)\n\t}\n\n\n\ttype(): CustomerPaymentSourceType {\n\t\treturn CustomerPaymentSources.TYPE\n\t}\n\n}\n\n\nexport default CustomerPaymentSources\n\nexport type { CustomerPaymentSource, CustomerPaymentSourceCreate, CustomerPaymentSourceUpdate, CustomerPaymentSourceType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Customer } from './customers'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype CustomerSubscriptionType = 'customer_subscriptions'\ntype CustomerSubscriptionRel = ResourceRel & { type: CustomerSubscriptionType }\n\n\nexport type CustomerSubscriptionSort = Pick<CustomerSubscription, 'id'> & ResourceSort\n// export type CustomerSubscriptionFilter = Pick<CustomerSubscription, 'id'> & ResourceFilter\n\n\ninterface CustomerSubscription extends Resource {\n\t\n\treadonly type: CustomerSubscriptionType\n\n\tcustomer_email: string\n\n\tcustomer?: Customer | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface CustomerSubscriptionCreate extends ResourceCreate {\n\t\n\tcustomer_email: string\n\t\n}\n\n\ntype CustomerSubscriptionUpdate = ResourceUpdate\n\n\nclass CustomerSubscriptions extends ApiResource<CustomerSubscription> {\n\n\tstatic readonly TYPE: CustomerSubscriptionType = 'customer_subscriptions' as const\n\n\tasync create(resource: CustomerSubscriptionCreate, params?: QueryParamsRetrieve<CustomerSubscription>, options?: ResourcesConfig): Promise<CustomerSubscription> {\n\t\treturn this.resources.create<CustomerSubscriptionCreate, CustomerSubscription>({ ...resource, type: CustomerSubscriptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerSubscriptionUpdate, params?: QueryParamsRetrieve<CustomerSubscription>, options?: ResourcesConfig): Promise<CustomerSubscription> {\n\t\treturn this.resources.update<CustomerSubscriptionUpdate, CustomerSubscription>({ ...resource, type: CustomerSubscriptions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: CustomerSubscriptions.TYPE } : id, options)\n\t}\n\n\tasync customer(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerSubscriptionId = (customerSubscriptionId as CustomerSubscription).id || customerSubscriptionId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customer_subscriptions/${_customerSubscriptionId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync events(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerSubscriptionId = (customerSubscriptionId as CustomerSubscription).id || customerSubscriptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customer_subscriptions/${_customerSubscriptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _customerSubscriptionId = (customerSubscriptionId as CustomerSubscription).id || customerSubscriptionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `customer_subscriptions/${_customerSubscriptionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisCustomerSubscription(resource: any): resource is CustomerSubscription {\n\t\treturn resource.type && (resource.type === CustomerSubscriptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerSubscriptionRel {\n\t\treturn super.relationshipOneToOne<CustomerSubscriptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerSubscriptionRel[] {\n\t\treturn super.relationshipOneToMany<CustomerSubscriptionRel>(...ids)\n\t}\n\n\n\ttype(): CustomerSubscriptionType {\n\t\treturn CustomerSubscriptions.TYPE\n\t}\n\n}\n\n\nexport default CustomerSubscriptions\n\nexport type { CustomerSubscription, CustomerSubscriptionCreate, CustomerSubscriptionUpdate, CustomerSubscriptionType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { CustomerGroup, CustomerGroupType } from './customer_groups'\nimport type { CustomerAddress } from './customer_addresses'\nimport type { CustomerPaymentSource } from './customer_payment_sources'\nimport type { CustomerSubscription } from './customer_subscriptions'\nimport type { Order } from './orders'\nimport type { OrderSubscription } from './order_subscriptions'\nimport type { Return } from './returns'\nimport type { SkuList } from './sku_lists'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\n\n\ntype CustomerType = 'customers'\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type CustomerSort = Pick<Customer, 'id' | 'status' | 'total_orders_count'> & ResourceSort\n// export type CustomerFilter = Pick<Customer, 'id' | 'email' | 'status' | 'has_password' | 'total_orders_count'> & ResourceFilter\n\n\ninterface Customer extends Resource {\n\t\n\treadonly type: CustomerType\n\n\temail: string\n\tstatus: 'prospect' | 'acquired' | 'repeat'\n\thas_password?: boolean | null\n\ttotal_orders_count?: number | null\n\n\tcustomer_group?: CustomerGroup | null\n\tcustomer_addresses?: CustomerAddress[] | null\n\tcustomer_payment_sources?: CustomerPaymentSource[] | null\n\tcustomer_subscriptions?: CustomerSubscription[] | null\n\torders?: Order[] | null\n\torder_subscriptions?: OrderSubscription[] | null\n\treturns?: Return[] | null\n\tsku_lists?: SkuList[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\n}\n\n\ninterface CustomerCreate extends ResourceCreate {\n\t\n\temail: string\n\tpassword?: string | null\n\n\tcustomer_group?: CustomerGroupRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface CustomerUpdate extends ResourceUpdate {\n\t\n\temail?: string | null\n\tpassword?: string | null\n\n\tcustomer_group?: CustomerGroupRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Customers extends ApiResource<Customer> {\n\n\tstatic readonly TYPE: CustomerType = 'customers' as const\n\n\tasync create(resource: CustomerCreate, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.create<CustomerCreate, Customer>({ ...resource, type: Customers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerUpdate, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ ...resource, type: Customers.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Customers.TYPE } : id, options)\n\t}\n\n\tasync customer_group(customerId: string | Customer, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerGroup>({ type: 'customer_groups' }, `customers/${_customerId}/customer_group`, params, options) as unknown as CustomerGroup\n\t}\n\n\tasync customer_addresses(customerId: string | Customer, params?: QueryParamsList<CustomerAddress>, options?: ResourcesConfig): Promise<ListResponse<CustomerAddress>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerAddress>({ type: 'customer_addresses' }, `customers/${_customerId}/customer_addresses`, params, options) as unknown as ListResponse<CustomerAddress>\n\t}\n\n\tasync customer_payment_sources(customerId: string | Customer, params?: QueryParamsList<CustomerPaymentSource>, options?: ResourcesConfig): Promise<ListResponse<CustomerPaymentSource>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerPaymentSource>({ type: 'customer_payment_sources' }, `customers/${_customerId}/customer_payment_sources`, params, options) as unknown as ListResponse<CustomerPaymentSource>\n\t}\n\n\tasync customer_subscriptions(customerId: string | Customer, params?: QueryParamsList<CustomerSubscription>, options?: ResourcesConfig): Promise<ListResponse<CustomerSubscription>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerSubscription>({ type: 'customer_subscriptions' }, `customers/${_customerId}/customer_subscriptions`, params, options) as unknown as ListResponse<CustomerSubscription>\n\t}\n\n\tasync orders(customerId: string | Customer, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `customers/${_customerId}/orders`, params, options) as unknown as ListResponse<Order>\n\t}\n\n\tasync order_subscriptions(customerId: string | Customer, params?: QueryParamsList<OrderSubscription>, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `customers/${_customerId}/order_subscriptions`, params, options) as unknown as ListResponse<OrderSubscription>\n\t}\n\n\tasync returns(customerId: string | Customer, params?: QueryParamsList<Return>, options?: ResourcesConfig): Promise<ListResponse<Return>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Return>({ type: 'returns' }, `customers/${_customerId}/returns`, params, options) as unknown as ListResponse<Return>\n\t}\n\n\tasync sku_lists(customerId: string | Customer, params?: QueryParamsList<SkuList>, options?: ResourcesConfig): Promise<ListResponse<SkuList>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `customers/${_customerId}/sku_lists`, params, options) as unknown as ListResponse<SkuList>\n\t}\n\n\tasync attachments(customerId: string | Customer, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `customers/${_customerId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(customerId: string | Customer, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customers/${_customerId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(customerId: string | Customer, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `customers/${_customerId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\n\tisCustomer(resource: any): resource is Customer {\n\t\treturn resource.type && (resource.type === Customers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerRel {\n\t\treturn super.relationshipOneToOne<CustomerRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerRel[] {\n\t\treturn super.relationshipOneToMany<CustomerRel>(...ids)\n\t}\n\n\n\ttype(): CustomerType {\n\t\treturn Customers.TYPE\n\t}\n\n}\n\n\nexport default Customers\n\nexport type { Customer, CustomerCreate, CustomerUpdate, CustomerType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype DeliveryLeadTimeType = 'delivery_lead_times'\ntype DeliveryLeadTimeRel = ResourceRel & { type: DeliveryLeadTimeType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\n\n\nexport type DeliveryLeadTimeSort = Pick<DeliveryLeadTime, 'id' | 'min_hours' | 'max_hours' | 'min_days'> & ResourceSort\n// export type DeliveryLeadTimeFilter = Pick<DeliveryLeadTime, 'id' | 'min_hours' | 'max_hours' | 'min_days' | 'max_days'> & ResourceFilter\n\n\ninterface DeliveryLeadTime extends Resource {\n\t\n\treadonly type: DeliveryLeadTimeType\n\n\tmin_hours: number\n\tmax_hours: number\n\tmin_days?: number | null\n\tmax_days?: number | null\n\n\tstock_location?: StockLocation | null\n\tshipping_method?: ShippingMethod | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface DeliveryLeadTimeCreate extends ResourceCreate {\n\t\n\tmin_hours: number\n\tmax_hours: number\n\n\tstock_location: StockLocationRel\n\tshipping_method: ShippingMethodRel\n\n}\n\n\ninterface DeliveryLeadTimeUpdate extends ResourceUpdate {\n\t\n\tmin_hours?: number | null\n\tmax_hours?: number | null\n\n\tstock_location?: StockLocationRel | null\n\tshipping_method?: ShippingMethodRel | null\n\n}\n\n\nclass DeliveryLeadTimes extends ApiResource<DeliveryLeadTime> {\n\n\tstatic readonly TYPE: DeliveryLeadTimeType = 'delivery_lead_times' as const\n\n\tasync create(resource: DeliveryLeadTimeCreate, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\treturn this.resources.create<DeliveryLeadTimeCreate, DeliveryLeadTime>({ ...resource, type: DeliveryLeadTimes.TYPE }, params, options)\n\t}\n\n\tasync update(resource: DeliveryLeadTimeUpdate, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\treturn this.resources.update<DeliveryLeadTimeUpdate, DeliveryLeadTime>({ ...resource, type: DeliveryLeadTimes.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: DeliveryLeadTimes.TYPE } : id, options)\n\t}\n\n\tasync stock_location(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _deliveryLeadTimeId = (deliveryLeadTimeId as DeliveryLeadTime).id || deliveryLeadTimeId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `delivery_lead_times/${_deliveryLeadTimeId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync shipping_method(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _deliveryLeadTimeId = (deliveryLeadTimeId as DeliveryLeadTime).id || deliveryLeadTimeId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `delivery_lead_times/${_deliveryLeadTimeId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync attachments(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _deliveryLeadTimeId = (deliveryLeadTimeId as DeliveryLeadTime).id || deliveryLeadTimeId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `delivery_lead_times/${_deliveryLeadTimeId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _deliveryLeadTimeId = (deliveryLeadTimeId as DeliveryLeadTime).id || deliveryLeadTimeId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `delivery_lead_times/${_deliveryLeadTimeId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisDeliveryLeadTime(resource: any): resource is DeliveryLeadTime {\n\t\treturn resource.type && (resource.type === DeliveryLeadTimes.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): DeliveryLeadTimeRel {\n\t\treturn super.relationshipOneToOne<DeliveryLeadTimeRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): DeliveryLeadTimeRel[] {\n\t\treturn super.relationshipOneToMany<DeliveryLeadTimeRel>(...ids)\n\t}\n\n\n\ttype(): DeliveryLeadTimeType {\n\t\treturn DeliveryLeadTimes.TYPE\n\t}\n\n}\n\n\nexport default DeliveryLeadTimes\n\nexport type { DeliveryLeadTime, DeliveryLeadTimeCreate, DeliveryLeadTimeUpdate, DeliveryLeadTimeType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\nimport type { Webhook } from './webhooks'\n\n\ntype EventCallbackType = 'event_callbacks'\ntype EventCallbackRel = ResourceRel & { type: EventCallbackType }\n\n\nexport type EventCallbackSort = Pick<EventCallback, 'id' | 'response_code' | 'response_message'> & ResourceSort\n// export type EventCallbackFilter = Pick<EventCallback, 'id' | 'callback_url' | 'response_code' | 'response_message'> & ResourceFilter\n\n\ninterface EventCallback extends Resource {\n\t\n\treadonly type: EventCallbackType\n\n\tcallback_url: string\n\tpayload?: Record<string, any> | null\n\tresponse_code?: string | null\n\tresponse_message?: string | null\n\n\twebhook?: Webhook | null\n\n}\n\n\nclass EventCallbacks extends ApiResource<EventCallback> {\n\n\tstatic readonly TYPE: EventCallbackType = 'event_callbacks' as const\n\n\tasync webhook(eventCallbackId: string | EventCallback, params?: QueryParamsRetrieve<Webhook>, options?: ResourcesConfig): Promise<Webhook> {\n\t\tconst _eventCallbackId = (eventCallbackId as EventCallback).id || eventCallbackId as string\n\t\treturn this.resources.fetch<Webhook>({ type: 'webhooks' }, `event_callbacks/${_eventCallbackId}/webhook`, params, options) as unknown as Webhook\n\t}\n\n\n\tisEventCallback(resource: any): resource is EventCallback {\n\t\treturn resource.type && (resource.type === EventCallbacks.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): EventCallbackRel {\n\t\treturn super.relationshipOneToOne<EventCallbackRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): EventCallbackRel[] {\n\t\treturn super.relationshipOneToMany<EventCallbackRel>(...ids)\n\t}\n\n\n\ttype(): EventCallbackType {\n\t\treturn EventCallbacks.TYPE\n\t}\n\n}\n\n\nexport default EventCallbacks\n\nexport type { EventCallback, EventCallbackType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsList } from '../query'\n\nimport type { Webhook } from './webhooks'\nimport type { EventCallback } from './event_callbacks'\n\n\ntype EventType = 'events'\ntype EventRel = ResourceRel & { type: EventType }\n\n\nexport type EventSort = Pick<Event, 'id' | 'name'> & ResourceSort\n// export type EventFilter = Pick<Event, 'id' | 'name'> & ResourceFilter\n\n\ninterface Event extends Resource {\n\t\n\treadonly type: EventType\n\n\tname: string\n\n\twebhooks?: Webhook[] | null\n\tlast_event_callbacks?: EventCallback[] | null\n\n}\n\n\nclass Events extends ApiResource<Event> {\n\n\tstatic readonly TYPE: EventType = 'events' as const\n\n\tasync webhooks(eventId: string | Event, params?: QueryParamsList<Webhook>, options?: ResourcesConfig): Promise<ListResponse<Webhook>> {\n\t\tconst _eventId = (eventId as Event).id || eventId as string\n\t\treturn this.resources.fetch<Webhook>({ type: 'webhooks' }, `events/${_eventId}/webhooks`, params, options) as unknown as ListResponse<Webhook>\n\t}\n\n\tasync last_event_callbacks(eventId: string | Event, params?: QueryParamsList<EventCallback>, options?: ResourcesConfig): Promise<ListResponse<EventCallback>> {\n\t\tconst _eventId = (eventId as Event).id || eventId as string\n\t\treturn this.resources.fetch<EventCallback>({ type: 'event_callbacks' }, `events/${_eventId}/last_event_callbacks`, params, options) as unknown as ListResponse<EventCallback>\n\t}\n\n\n\tisEvent(resource: any): resource is Event {\n\t\treturn resource.type && (resource.type === Events.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): EventRel {\n\t\treturn super.relationshipOneToOne<EventRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): EventRel[] {\n\t\treturn super.relationshipOneToMany<EventRel>(...ids)\n\t}\n\n\n\ttype(): EventType {\n\t\treturn Events.TYPE\n\t}\n\n}\n\n\nexport default Events\n\nexport type { Event, EventType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Event } from './events'\n\n\ntype ExportType = 'exports'\ntype ExportRel = ResourceRel & { type: ExportType }\n\n\nexport type ExportSort = Pick<Export, 'id' | 'resource_type' | 'format' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'records_count' | 'attachment_url'> & ResourceSort\n// export type ExportFilter = Pick<Export, 'id' | 'resource_type' | 'format' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'records_count' | 'attachment_url'> & ResourceFilter\n\n\ninterface Export extends Resource {\n\t\n\treadonly type: ExportType\n\n\tresource_type: string\n\tformat?: string | null\n\tstatus: 'pending' | 'in_progress' | 'completed'\n\tincludes?: string[] | null\n\tfilters?: Record<string, any> | null\n\tdry_data?: boolean | null\n\tstarted_at?: string | null\n\tcompleted_at?: string | null\n\tinterrupted_at?: string | null\n\trecords_count?: number | null\n\tattachment_url?: string | null\n\n\tevents?: Event[] | null\n\n}\n\n\ninterface ExportCreate extends ResourceCreate {\n\t\n\tresource_type: string\n\tformat?: string | null\n\tincludes?: string[] | null\n\tfilters?: Record<string, any> | null\n\tdry_data?: boolean | null\n\t\n}\n\n\nclass Exports extends ApiResource<Export> {\n\n\tstatic readonly TYPE: ExportType = 'exports' as const\n\n\tasync create(resource: ExportCreate, params?: QueryParamsRetrieve<Export>, options?: ResourcesConfig): Promise<Export> {\n\t\treturn this.resources.create<ExportCreate, Export>({ ...resource, type: Exports.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Exports.TYPE } : id, options)\n\t}\n\n\tasync events(exportId: string | Export, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _exportId = (exportId as Export).id || exportId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `exports/${_exportId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\n\tisExport(resource: any): resource is Export {\n\t\treturn resource.type && (resource.type === Exports.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ExportRel {\n\t\treturn super.relationshipOneToOne<ExportRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ExportRel[] {\n\t\treturn super.relationshipOneToMany<ExportRel>(...ids)\n\t}\n\n\n\ttype(): ExportType {\n\t\treturn Exports.TYPE\n\t}\n\n}\n\n\nexport default Exports\n\nexport type { Export, ExportCreate, ExportType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { ExternalPayment } from './external_payments'\n\n\ntype ExternalGatewayType = 'external_gateways'\ntype ExternalGatewayRel = ResourceRel & { type: ExternalGatewayType }\n\n\nexport type ExternalGatewaySort = Pick<ExternalGateway, 'id' | 'name' | 'circuit_state' | 'circuit_failure_count'> & ResourceSort\n// export type ExternalGatewayFilter = Pick<ExternalGateway, 'id' | 'name' | 'circuit_state' | 'circuit_failure_count'> & ResourceFilter\n\n\ninterface ExternalGateway extends Resource {\n\t\n\treadonly type: ExternalGatewayType\n\n\tname: string\n\tauthorize_url?: string | null\n\tcapture_url?: string | null\n\tvoid_url?: string | null\n\trefund_url?: string | null\n\ttoken_url?: string | null\n\tcircuit_state?: string | null\n\tcircuit_failure_count?: number | null\n\tshared_secret: string\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\texternal_payments?: ExternalPayment[] | null\n\n}\n\n\ninterface ExternalGatewayCreate extends ResourceCreate {\n\t\n\tname: string\n\tauthorize_url?: string | null\n\tcapture_url?: string | null\n\tvoid_url?: string | null\n\trefund_url?: string | null\n\ttoken_url?: string | null\n\t\n}\n\n\ninterface ExternalGatewayUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tauthorize_url?: string | null\n\tcapture_url?: string | null\n\tvoid_url?: string | null\n\trefund_url?: string | null\n\ttoken_url?: string | null\n\t_reset_circuit?: boolean | null\n\t\n}\n\n\nclass ExternalGateways extends ApiResource<ExternalGateway> {\n\n\tstatic readonly TYPE: ExternalGatewayType = 'external_gateways' as const\n\n\tasync create(resource: ExternalGatewayCreate, params?: QueryParamsRetrieve<ExternalGateway>, options?: ResourcesConfig): Promise<ExternalGateway> {\n\t\treturn this.resources.create<ExternalGatewayCreate, ExternalGateway>({ ...resource, type: ExternalGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ExternalGatewayUpdate, params?: QueryParamsRetrieve<ExternalGateway>, options?: ResourcesConfig): Promise<ExternalGateway> {\n\t\treturn this.resources.update<ExternalGatewayUpdate, ExternalGateway>({ ...resource, type: ExternalGateways.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: ExternalGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(externalGatewayId: string | ExternalGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _externalGatewayId = (externalGatewayId as ExternalGateway).id || externalGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `external_gateways/${_externalGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(externalGatewayId: string | ExternalGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _externalGatewayId = (externalGatewayId as ExternalGateway).id || externalGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `external_gateways/${_externalGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync external_payments(externalGatewayId: string | ExternalGateway, params?: QueryParamsList<ExternalPayment>, options?: ResourcesConfig): Promise<ListResponse<ExternalPayment>> {\n\t\tconst _externalGatewayId = (externalGatewayId as ExternalGateway).id || externalGatewayId as string\n\t\treturn this.resources.fetch<ExternalPayment>({ type: 'external_payments' }, `external_gateways/${_externalGatewayId}/external_payments`, params, options) as unknown as ListResponse<ExternalPayment>\n\t}\n\n\tasync _reset_circuit(id: string | ExternalGateway, params?: QueryParamsRetrieve<ExternalGateway>, options?: ResourcesConfig): Promise<ExternalGateway> {\n\t\treturn this.resources.update<ExternalGatewayUpdate, ExternalGateway>({ id: (typeof id === 'string')? id: id.id, type: ExternalGateways.TYPE, _reset_circuit: true }, params, options)\n\t}\n\n\n\tisExternalGateway(resource: any): resource is ExternalGateway {\n\t\treturn resource.type && (resource.type === ExternalGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ExternalGatewayRel {\n\t\treturn super.relationshipOneToOne<ExternalGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ExternalGatewayRel[] {\n\t\treturn super.relationshipOneToMany<ExternalGatewayRel>(...ids)\n\t}\n\n\n\ttype(): ExternalGatewayType {\n\t\treturn ExternalGateways.TYPE\n\t}\n\n}\n\n\nexport default ExternalGateways\n\nexport type { ExternalGateway, ExternalGatewayCreate, ExternalGatewayUpdate, ExternalGatewayType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { CustomerPaymentSource } from './customer_payment_sources'\nimport type { Version } from './versions'\n\n\ntype ExternalPaymentType = 'external_payments'\ntype ExternalPaymentRel = ResourceRel & { type: ExternalPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type ExternalPaymentSort = Pick<ExternalPayment, 'id'> & ResourceSort\n// export type ExternalPaymentFilter = Pick<ExternalPayment, 'id' | 'payment_source_token'> & ResourceFilter\n\n\ninterface ExternalPayment extends Resource {\n\t\n\treadonly type: ExternalPaymentType\n\n\tpayment_source_token: string\n\toptions?: Record<string, any> | null\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\twallet?: CustomerPaymentSource | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ExternalPaymentCreate extends ResourceCreate {\n\t\n\tpayment_source_token: string\n\toptions?: Record<string, any> | null\n\n\torder: OrderRel\n\n}\n\n\ninterface ExternalPaymentUpdate extends ResourceUpdate {\n\t\n\toptions?: Record<string, any> | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass ExternalPayments extends ApiResource<ExternalPayment> {\n\n\tstatic readonly TYPE: ExternalPaymentType = 'external_payments' as const\n\n\tasync create(resource: ExternalPaymentCreate, params?: QueryParamsRetrieve<ExternalPayment>, options?: ResourcesConfig): Promise<ExternalPayment> {\n\t\treturn this.resources.create<ExternalPaymentCreate, ExternalPayment>({ ...resource, type: ExternalPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ExternalPaymentUpdate, params?: QueryParamsRetrieve<ExternalPayment>, options?: ResourcesConfig): Promise<ExternalPayment> {\n\t\treturn this.resources.update<ExternalPaymentUpdate, ExternalPayment>({ ...resource, type: ExternalPayments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: ExternalPayments.TYPE } : id, options)\n\t}\n\n\tasync order(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _externalPaymentId = (externalPaymentId as ExternalPayment).id || externalPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `external_payments/${_externalPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _externalPaymentId = (externalPaymentId as ExternalPayment).id || externalPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `external_payments/${_externalPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync wallet(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve<CustomerPaymentSource>, options?: ResourcesConfig): Promise<CustomerPaymentSource> {\n\t\tconst _externalPaymentId = (externalPaymentId as ExternalPayment).id || externalPaymentId as string\n\t\treturn this.resources.fetch<CustomerPaymentSource>({ type: 'customer_payment_sources' }, `external_payments/${_externalPaymentId}/wallet`, params, options) as unknown as CustomerPaymentSource\n\t}\n\n\tasync versions(externalPaymentId: string | ExternalPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _externalPaymentId = (externalPaymentId as ExternalPayment).id || externalPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `external_payments/${_externalPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisExternalPayment(resource: any): resource is ExternalPayment {\n\t\treturn resource.type && (resource.type === ExternalPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ExternalPaymentRel {\n\t\treturn super.relationshipOneToOne<ExternalPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ExternalPaymentRel[] {\n\t\treturn super.relationshipOneToMany<ExternalPaymentRel>(...ids)\n\t}\n\n\n\ttype(): ExternalPaymentType {\n\t\treturn ExternalPayments.TYPE\n\t}\n\n}\n\n\nexport default ExternalPayments\n\nexport type { ExternalPayment, ExternalPaymentCreate, ExternalPaymentUpdate, ExternalPaymentType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { PromotionRule } from './promotion_rules'\nimport type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { Sku } from './skus'\n\n\ntype ExternalPromotionType = 'external_promotions'\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type ExternalPromotionSort = Pick<ExternalPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceSort\n// export type ExternalPromotionFilter = Pick<ExternalPromotion, 'id' | 'name' | 'currency_code' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceFilter\n\n\ninterface ExternalPromotion extends Resource {\n\t\n\treadonly type: ExternalPromotionType\n\n\tname: string\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at: string\n\texpires_at: string\n\ttotal_usage_limit?: number | null\n\ttotal_usage_count?: number | null\n\tactive?: boolean | null\n\tdisabled_at?: string | null\n\tpromotion_url: string\n\tcircuit_state?: string | null\n\tcircuit_failure_count?: number | null\n\tshared_secret: string\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface ExternalPromotionCreate extends ResourceCreate {\n\t\n\tname: string\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at: string\n\texpires_at: string\n\ttotal_usage_limit?: number | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\tpromotion_url: string\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface ExternalPromotionUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at?: string | null\n\texpires_at?: string | null\n\ttotal_usage_limit?: number | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\tpromotion_url?: string | null\n\t_reset_circuit?: boolean | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass ExternalPromotions extends ApiResource<ExternalPromotion> {\n\n\tstatic readonly TYPE: ExternalPromotionType = 'external_promotions' as const\n\n\tasync create(resource: ExternalPromotionCreate, params?: QueryParamsRetrieve<ExternalPromotion>, options?: ResourcesConfig): Promise<ExternalPromotion> {\n\t\treturn this.resources.create<ExternalPromotionCreate, ExternalPromotion>({ ...resource, type: ExternalPromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ExternalPromotionUpdate, params?: QueryParamsRetrieve<ExternalPromotion>, options?: ResourcesConfig): Promise<ExternalPromotion> {\n\t\treturn this.resources.update<ExternalPromotionUpdate, ExternalPromotion>({ ...resource, type: ExternalPromotions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: ExternalPromotions.TYPE } : id, options)\n\t}\n\n\tasync market(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `external_promotions/${_externalPromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `external_promotions/${_externalPromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `external_promotions/${_externalPromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `external_promotions/${_externalPromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `external_promotions/${_externalPromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `external_promotions/${_externalPromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `external_promotions/${_externalPromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `external_promotions/${_externalPromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `external_promotions/${_externalPromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `external_promotions/${_externalPromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `external_promotions/${_externalPromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync skus(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _externalPromotionId = (externalPromotionId as ExternalPromotion).id || externalPromotionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `external_promotions/${_externalPromotionId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync _disable(id: string | ExternalPromotion, params?: QueryParamsRetrieve<ExternalPromotion>, options?: ResourcesConfig): Promise<ExternalPromotion> {\n\t\treturn this.resources.update<ExternalPromotionUpdate, ExternalPromotion>({ id: (typeof id === 'string')? id: id.id, type: ExternalPromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | ExternalPromotion, params?: QueryParamsRetrieve<ExternalPromotion>, options?: ResourcesConfig): Promise<ExternalPromotion> {\n\t\treturn this.resources.update<ExternalPromotionUpdate, ExternalPromotion>({ id: (typeof id === 'string')? id: id.id, type: ExternalPromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _reset_circuit(id: string | ExternalPromotion, params?: QueryParamsRetrieve<ExternalPromotion>, options?: ResourcesConfig): Promise<ExternalPromotion> {\n\t\treturn this.resources.update<ExternalPromotionUpdate, ExternalPromotion>({ id: (typeof id === 'string')? id: id.id, type: ExternalPromotions.TYPE, _reset_circuit: true }, params, options)\n\t}\n\n\n\tisExternalPromotion(resource: any): resource is ExternalPromotion {\n\t\treturn resource.type && (resource.type === ExternalPromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ExternalPromotionRel {\n\t\treturn super.relationshipOneToOne<ExternalPromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ExternalPromotionRel[] {\n\t\treturn super.relationshipOneToMany<ExternalPromotionRel>(...ids)\n\t}\n\n\n\ttype(): ExternalPromotionType {\n\t\treturn ExternalPromotions.TYPE\n\t}\n\n}\n\n\nexport default ExternalPromotions\n\nexport type { ExternalPromotion, ExternalPromotionCreate, ExternalPromotionUpdate, ExternalPromotionType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ExternalTaxCalculatorType = 'external_tax_calculators'\ntype ExternalTaxCalculatorRel = ResourceRel & { type: ExternalTaxCalculatorType }\n\n\nexport type ExternalTaxCalculatorSort = Pick<ExternalTaxCalculator, 'id' | 'name' | 'circuit_state' | 'circuit_failure_count'> & ResourceSort\n// export type ExternalTaxCalculatorFilter = Pick<ExternalTaxCalculator, 'id' | 'name' | 'circuit_state' | 'circuit_failure_count'> & ResourceFilter\n\n\ninterface ExternalTaxCalculator extends Resource {\n\t\n\treadonly type: ExternalTaxCalculatorType\n\n\tname: string\n\ttax_calculator_url: string\n\tcircuit_state?: string | null\n\tcircuit_failure_count?: number | null\n\tshared_secret: string\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ExternalTaxCalculatorCreate extends ResourceCreate {\n\t\n\tname: string\n\ttax_calculator_url: string\n\t\n}\n\n\ninterface ExternalTaxCalculatorUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\ttax_calculator_url?: string | null\n\t_reset_circuit?: boolean | null\n\t\n}\n\n\nclass ExternalTaxCalculators extends ApiResource<ExternalTaxCalculator> {\n\n\tstatic readonly TYPE: ExternalTaxCalculatorType = 'external_tax_calculators' as const\n\n\tasync create(resource: ExternalTaxCalculatorCreate, params?: QueryParamsRetrieve<ExternalTaxCalculator>, options?: ResourcesConfig): Promise<ExternalTaxCalculator> {\n\t\treturn this.resources.create<ExternalTaxCalculatorCreate, ExternalTaxCalculator>({ ...resource, type: ExternalTaxCalculators.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ExternalTaxCalculatorUpdate, params?: QueryParamsRetrieve<ExternalTaxCalculator>, options?: ResourcesConfig): Promise<ExternalTaxCalculator> {\n\t\treturn this.resources.update<ExternalTaxCalculatorUpdate, ExternalTaxCalculator>({ ...resource, type: ExternalTaxCalculators.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: ExternalTaxCalculators.TYPE } : id, options)\n\t}\n\n\tasync markets(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _externalTaxCalculatorId = (externalTaxCalculatorId as ExternalTaxCalculator).id || externalTaxCalculatorId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `external_tax_calculators/${_externalTaxCalculatorId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _externalTaxCalculatorId = (externalTaxCalculatorId as ExternalTaxCalculator).id || externalTaxCalculatorId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `external_tax_calculators/${_externalTaxCalculatorId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _externalTaxCalculatorId = (externalTaxCalculatorId as ExternalTaxCalculator).id || externalTaxCalculatorId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `external_tax_calculators/${_externalTaxCalculatorId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _reset_circuit(id: string | ExternalTaxCalculator, params?: QueryParamsRetrieve<ExternalTaxCalculator>, options?: ResourcesConfig): Promise<ExternalTaxCalculator> {\n\t\treturn this.resources.update<ExternalTaxCalculatorUpdate, ExternalTaxCalculator>({ id: (typeof id === 'string')? id: id.id, type: ExternalTaxCalculators.TYPE, _reset_circuit: true }, params, options)\n\t}\n\n\n\tisExternalTaxCalculator(resource: any): resource is ExternalTaxCalculator {\n\t\treturn resource.type && (resource.type === ExternalTaxCalculators.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ExternalTaxCalculatorRel {\n\t\treturn super.relationshipOneToOne<ExternalTaxCalculatorRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ExternalTaxCalculatorRel[] {\n\t\treturn super.relationshipOneToMany<ExternalTaxCalculatorRel>(...ids)\n\t}\n\n\n\ttype(): ExternalTaxCalculatorType {\n\t\treturn ExternalTaxCalculators.TYPE\n\t}\n\n}\n\n\nexport default ExternalTaxCalculators\n\nexport type { ExternalTaxCalculator, ExternalTaxCalculatorCreate, ExternalTaxCalculatorUpdate, ExternalTaxCalculatorType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { PromotionRule } from './promotion_rules'\nimport type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { Sku } from './skus'\n\n\ntype FixedAmountPromotionType = 'fixed_amount_promotions'\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type FixedAmountPromotionSort = Pick<FixedAmountPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceSort\n// export type FixedAmountPromotionFilter = Pick<FixedAmountPromotion, 'id' | 'name' | 'currency_code' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceFilter\n\n\ninterface FixedAmountPromotion extends Resource {\n\t\n\treadonly type: FixedAmountPromotionType\n\n\tname: string\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at: string\n\texpires_at: string\n\ttotal_usage_limit?: number | null\n\ttotal_usage_count?: number | null\n\tactive?: boolean | null\n\tdisabled_at?: string | null\n\tfixed_amount_cents: number\n\tfixed_amount_float?: number | null\n\tformatted_fixed_amount?: string | null\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface FixedAmountPromotionCreate extends ResourceCreate {\n\t\n\tname: string\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at: string\n\texpires_at: string\n\ttotal_usage_limit?: number | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\tfixed_amount_cents: number\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface FixedAmountPromotionUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at?: string | null\n\texpires_at?: string | null\n\ttotal_usage_limit?: number | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\tfixed_amount_cents?: number | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass FixedAmountPromotions extends ApiResource<FixedAmountPromotion> {\n\n\tstatic readonly TYPE: FixedAmountPromotionType = 'fixed_amount_promotions' as const\n\n\tasync create(resource: FixedAmountPromotionCreate, params?: QueryParamsRetrieve<FixedAmountPromotion>, options?: ResourcesConfig): Promise<FixedAmountPromotion> {\n\t\treturn this.resources.create<FixedAmountPromotionCreate, FixedAmountPromotion>({ ...resource, type: FixedAmountPromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: FixedAmountPromotionUpdate, params?: QueryParamsRetrieve<FixedAmountPromotion>, options?: ResourcesConfig): Promise<FixedAmountPromotion> {\n\t\treturn this.resources.update<FixedAmountPromotionUpdate, FixedAmountPromotion>({ ...resource, type: FixedAmountPromotions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: FixedAmountPromotions.TYPE } : id, options)\n\t}\n\n\tasync market(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync skus(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _fixedAmountPromotionId = (fixedAmountPromotionId as FixedAmountPromotion).id || fixedAmountPromotionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync _disable(id: string | FixedAmountPromotion, params?: QueryParamsRetrieve<FixedAmountPromotion>, options?: ResourcesConfig): Promise<FixedAmountPromotion> {\n\t\treturn this.resources.update<FixedAmountPromotionUpdate, FixedAmountPromotion>({ id: (typeof id === 'string')? id: id.id, type: FixedAmountPromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | FixedAmountPromotion, params?: QueryParamsRetrieve<FixedAmountPromotion>, options?: ResourcesConfig): Promise<FixedAmountPromotion> {\n\t\treturn this.resources.update<FixedAmountPromotionUpdate, FixedAmountPromotion>({ id: (typeof id === 'string')? id: id.id, type: FixedAmountPromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisFixedAmountPromotion(resource: any): resource is FixedAmountPromotion {\n\t\treturn resource.type && (resource.type === FixedAmountPromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): FixedAmountPromotionRel {\n\t\treturn super.relationshipOneToOne<FixedAmountPromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): FixedAmountPromotionRel[] {\n\t\treturn super.relationshipOneToMany<FixedAmountPromotionRel>(...ids)\n\t}\n\n\n\ttype(): FixedAmountPromotionType {\n\t\treturn FixedAmountPromotions.TYPE\n\t}\n\n}\n\n\nexport default FixedAmountPromotions\n\nexport type { FixedAmountPromotion, FixedAmountPromotionCreate, FixedAmountPromotionUpdate, FixedAmountPromotionType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { PromotionRule } from './promotion_rules'\nimport type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { Sku } from './skus'\n\n\ntype FixedPricePromotionType = 'fixed_price_promotions'\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type FixedPricePromotionSort = Pick<FixedPricePromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceSort\n// export type FixedPricePromotionFilter = Pick<FixedPricePromotion, 'id' | 'name' | 'currency_code' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceFilter\n\n\ninterface FixedPricePromotion extends Resource {\n\t\n\treadonly type: FixedPricePromotionType\n\n\tname: string\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at: string\n\texpires_at: string\n\ttotal_usage_limit?: number | null\n\ttotal_usage_count?: number | null\n\tactive?: boolean | null\n\tdisabled_at?: string | null\n\tfixed_amount_cents: number\n\tfixed_amount_float?: number | null\n\tformatted_fixed_amount?: string | null\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface FixedPricePromotionCreate extends ResourceCreate {\n\t\n\tname: string\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at: string\n\texpires_at: string\n\ttotal_usage_limit?: number | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\tfixed_amount_cents: number\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list: SkuListRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface FixedPricePromotionUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at?: string | null\n\texpires_at?: string | null\n\ttotal_usage_limit?: number | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\tfixed_amount_cents?: number | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass FixedPricePromotions extends ApiResource<FixedPricePromotion> {\n\n\tstatic readonly TYPE: FixedPricePromotionType = 'fixed_price_promotions' as const\n\n\tasync create(resource: FixedPricePromotionCreate, params?: QueryParamsRetrieve<FixedPricePromotion>, options?: ResourcesConfig): Promise<FixedPricePromotion> {\n\t\treturn this.resources.create<FixedPricePromotionCreate, FixedPricePromotion>({ ...resource, type: FixedPricePromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: FixedPricePromotionUpdate, params?: QueryParamsRetrieve<FixedPricePromotion>, options?: ResourcesConfig): Promise<FixedPricePromotion> {\n\t\treturn this.resources.update<FixedPricePromotionUpdate, FixedPricePromotion>({ ...resource, type: FixedPricePromotions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: FixedPricePromotions.TYPE } : id, options)\n\t}\n\n\tasync market(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `fixed_price_promotions/${_fixedPricePromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `fixed_price_promotions/${_fixedPricePromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `fixed_price_promotions/${_fixedPricePromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `fixed_price_promotions/${_fixedPricePromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `fixed_price_promotions/${_fixedPricePromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `fixed_price_promotions/${_fixedPricePromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `fixed_price_promotions/${_fixedPricePromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `fixed_price_promotions/${_fixedPricePromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `fixed_price_promotions/${_fixedPricePromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `fixed_price_promotions/${_fixedPricePromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `fixed_price_promotions/${_fixedPricePromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync skus(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _fixedPricePromotionId = (fixedPricePromotionId as FixedPricePromotion).id || fixedPricePromotionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `fixed_price_promotions/${_fixedPricePromotionId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync _disable(id: string | FixedPricePromotion, params?: QueryParamsRetrieve<FixedPricePromotion>, options?: ResourcesConfig): Promise<FixedPricePromotion> {\n\t\treturn this.resources.update<FixedPricePromotionUpdate, FixedPricePromotion>({ id: (typeof id === 'string')? id: id.id, type: FixedPricePromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | FixedPricePromotion, params?: QueryParamsRetrieve<FixedPricePromotion>, options?: ResourcesConfig): Promise<FixedPricePromotion> {\n\t\treturn this.resources.update<FixedPricePromotionUpdate, FixedPricePromotion>({ id: (typeof id === 'string')? id: id.id, type: FixedPricePromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisFixedPricePromotion(resource: any): resource is FixedPricePromotion {\n\t\treturn resource.type && (resource.type === FixedPricePromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): FixedPricePromotionRel {\n\t\treturn super.relationshipOneToOne<FixedPricePromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): FixedPricePromotionRel[] {\n\t\treturn super.relationshipOneToMany<FixedPricePromotionRel>(...ids)\n\t}\n\n\n\ttype(): FixedPricePromotionType {\n\t\treturn FixedPricePromotions.TYPE\n\t}\n\n}\n\n\nexport default FixedPricePromotions\n\nexport type { FixedPricePromotion, FixedPricePromotionCreate, FixedPricePromotionUpdate, FixedPricePromotionType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { PromotionRule } from './promotion_rules'\nimport type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { Sku } from './skus'\n\n\ntype FreeGiftPromotionType = 'free_gift_promotions'\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type FreeGiftPromotionSort = Pick<FreeGiftPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceSort\n// export type FreeGiftPromotionFilter = Pick<FreeGiftPromotion, 'id' | 'name' | 'currency_code' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceFilter\n\n\ninterface FreeGiftPromotion extends Resource {\n\t\n\treadonly type: FreeGiftPromotionType\n\n\tname: string\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at: string\n\texpires_at: string\n\ttotal_usage_limit?: number | null\n\ttotal_usage_count?: number | null\n\tactive?: boolean | null\n\tdisabled_at?: string | null\n\tmax_quantity?: number | null\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface FreeGiftPromotionCreate extends ResourceCreate {\n\t\n\tname: string\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at: string\n\texpires_at: string\n\ttotal_usage_limit?: number | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\tmax_quantity?: number | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list: SkuListRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface FreeGiftPromotionUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at?: string | null\n\texpires_at?: string | null\n\ttotal_usage_limit?: number | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\tmax_quantity?: number | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass FreeGiftPromotions extends ApiResource<FreeGiftPromotion> {\n\n\tstatic readonly TYPE: FreeGiftPromotionType = 'free_gift_promotions' as const\n\n\tasync create(resource: FreeGiftPromotionCreate, params?: QueryParamsRetrieve<FreeGiftPromotion>, options?: ResourcesConfig): Promise<FreeGiftPromotion> {\n\t\treturn this.resources.create<FreeGiftPromotionCreate, FreeGiftPromotion>({ ...resource, type: FreeGiftPromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: FreeGiftPromotionUpdate, params?: QueryParamsRetrieve<FreeGiftPromotion>, options?: ResourcesConfig): Promise<FreeGiftPromotion> {\n\t\treturn this.resources.update<FreeGiftPromotionUpdate, FreeGiftPromotion>({ ...resource, type: FreeGiftPromotions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: FreeGiftPromotions.TYPE } : id, options)\n\t}\n\n\tasync market(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _freeGiftPromotionId = (freeGiftPromotionId as FreeGiftPromotion).id || freeGiftPromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `free_gift_promotions/${_freeGiftPromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _freeGiftPromotionId = (freeGiftPromotionId as FreeGiftPromotion).id || freeGiftPromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `free_gift_promotions/${_freeGiftPromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _freeGiftPromotionId = (freeGiftPromotionId as FreeGiftPromotion).id || freeGiftPromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `free_gift_promotions/${_freeGiftPromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _freeGiftPromotionId = (freeGiftPromotionId as FreeGiftPromotion).id || freeGiftPromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `free_gift_promotions/${_freeGiftPromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _freeGiftPromotionId = (freeGiftPromotionId as FreeGiftPromotion).id || freeGiftPromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `free_gift_promotions/${_freeGiftPromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _freeGiftPromotionId = (freeGiftPromotionId as FreeGiftPromotion).id || freeGiftPromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `free_gift_promotions/${_freeGiftPromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _freeGiftPromotionId = (freeGiftPromotionId as FreeGiftPromotion).id || freeGiftPromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `free_gift_promotions/${_freeGiftPromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _freeGiftPromotionId = (freeGiftPromotionId as FreeGiftPromotion).id || freeGiftPromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `free_gift_promotions/${_freeGiftPromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _freeGiftPromotionId = (freeGiftPromotionId as FreeGiftPromotion).id || freeGiftPromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `free_gift_promotions/${_freeGiftPromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _freeGiftPromotionId = (freeGiftPromotionId as FreeGiftPromotion).id || freeGiftPromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `free_gift_promotions/${_freeGiftPromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _freeGiftPromotionId = (freeGiftPromotionId as FreeGiftPromotion).id || freeGiftPromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `free_gift_promotions/${_freeGiftPromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync skus(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _freeGiftPromotionId = (freeGiftPromotionId as FreeGiftPromotion).id || freeGiftPromotionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `free_gift_promotions/${_freeGiftPromotionId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync _disable(id: string | FreeGiftPromotion, params?: QueryParamsRetrieve<FreeGiftPromotion>, options?: ResourcesConfig): Promise<FreeGiftPromotion> {\n\t\treturn this.resources.update<FreeGiftPromotionUpdate, FreeGiftPromotion>({ id: (typeof id === 'string')? id: id.id, type: FreeGiftPromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | FreeGiftPromotion, params?: QueryParamsRetrieve<FreeGiftPromotion>, options?: ResourcesConfig): Promise<FreeGiftPromotion> {\n\t\treturn this.resources.update<FreeGiftPromotionUpdate, FreeGiftPromotion>({ id: (typeof id === 'string')? id: id.id, type: FreeGiftPromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisFreeGiftPromotion(resource: any): resource is FreeGiftPromotion {\n\t\treturn resource.type && (resource.type === FreeGiftPromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): FreeGiftPromotionRel {\n\t\treturn super.relationshipOneToOne<FreeGiftPromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): FreeGiftPromotionRel[] {\n\t\treturn super.relationshipOneToMany<FreeGiftPromotionRel>(...ids)\n\t}\n\n\n\ttype(): FreeGiftPromotionType {\n\t\treturn FreeGiftPromotions.TYPE\n\t}\n\n}\n\n\nexport default FreeGiftPromotions\n\nexport type { FreeGiftPromotion, FreeGiftPromotionCreate, FreeGiftPromotionUpdate, FreeGiftPromotionType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { PromotionRule } from './promotion_rules'\nimport type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype FreeShippingPromotionType = 'free_shipping_promotions'\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type FreeShippingPromotionSort = Pick<FreeShippingPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceSort\n// export type FreeShippingPromotionFilter = Pick<FreeShippingPromotion, 'id' | 'name' | 'currency_code' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceFilter\n\n\ninterface FreeShippingPromotion extends Resource {\n\t\n\treadonly type: FreeShippingPromotionType\n\n\tname: string\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at: string\n\texpires_at: string\n\ttotal_usage_limit?: number | null\n\ttotal_usage_count?: number | null\n\tactive?: boolean | null\n\tdisabled_at?: string | null\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface FreeShippingPromotionCreate extends ResourceCreate {\n\t\n\tname: string\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at: string\n\texpires_at: string\n\ttotal_usage_limit?: number | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface FreeShippingPromotionUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at?: string | null\n\texpires_at?: string | null\n\ttotal_usage_limit?: number | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass FreeShippingPromotions extends ApiResource<FreeShippingPromotion> {\n\n\tstatic readonly TYPE: FreeShippingPromotionType = 'free_shipping_promotions' as const\n\n\tasync create(resource: FreeShippingPromotionCreate, params?: QueryParamsRetrieve<FreeShippingPromotion>, options?: ResourcesConfig): Promise<FreeShippingPromotion> {\n\t\treturn this.resources.create<FreeShippingPromotionCreate, FreeShippingPromotion>({ ...resource, type: FreeShippingPromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: FreeShippingPromotionUpdate, params?: QueryParamsRetrieve<FreeShippingPromotion>, options?: ResourcesConfig): Promise<FreeShippingPromotion> {\n\t\treturn this.resources.update<FreeShippingPromotionUpdate, FreeShippingPromotion>({ ...resource, type: FreeShippingPromotions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: FreeShippingPromotions.TYPE } : id, options)\n\t}\n\n\tasync market(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `free_shipping_promotions/${_freeShippingPromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `free_shipping_promotions/${_freeShippingPromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `free_shipping_promotions/${_freeShippingPromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `free_shipping_promotions/${_freeShippingPromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `free_shipping_promotions/${_freeShippingPromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `free_shipping_promotions/${_freeShippingPromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _freeShippingPromotionId = (freeShippingPromotionId as FreeShippingPromotion).id || freeShippingPromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `free_shipping_promotions/${_freeShippingPromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | FreeShippingPromotion, params?: QueryParamsRetrieve<FreeShippingPromotion>, options?: ResourcesConfig): Promise<FreeShippingPromotion> {\n\t\treturn this.resources.update<FreeShippingPromotionUpdate, FreeShippingPromotion>({ id: (typeof id === 'string')? id: id.id, type: FreeShippingPromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | FreeShippingPromotion, params?: QueryParamsRetrieve<FreeShippingPromotion>, options?: ResourcesConfig): Promise<FreeShippingPromotion> {\n\t\treturn this.resources.update<FreeShippingPromotionUpdate, FreeShippingPromotion>({ id: (typeof id === 'string')? id: id.id, type: FreeShippingPromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisFreeShippingPromotion(resource: any): resource is FreeShippingPromotion {\n\t\treturn resource.type && (resource.type === FreeShippingPromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): FreeShippingPromotionRel {\n\t\treturn super.relationshipOneToOne<FreeShippingPromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): FreeShippingPromotionRel[] {\n\t\treturn super.relationshipOneToMany<FreeShippingPromotionRel>(...ids)\n\t}\n\n\n\ttype(): FreeShippingPromotionType {\n\t\treturn FreeShippingPromotions.TYPE\n\t}\n\n}\n\n\nexport default FreeShippingPromotions\n\nexport type { FreeShippingPromotion, FreeShippingPromotionCreate, FreeShippingPromotionUpdate, FreeShippingPromotionType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsList } from '../query'\n\nimport type { Address } from './addresses'\nimport type { Attachment } from './attachments'\n\n\ntype GeocoderType = 'geocoders'\ntype GeocoderRel = ResourceRel & { type: GeocoderType }\n\n\nexport type GeocoderSort = Pick<Geocoder, 'id' | 'name'> & ResourceSort\n// export type GeocoderFilter = Pick<Geocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface Geocoder extends Resource {\n\t\n\treadonly type: GeocoderType\n\n\tname: string\n\n\taddresses?: Address[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\nclass Geocoders extends ApiResource<Geocoder> {\n\n\tstatic readonly TYPE: GeocoderType = 'geocoders' as const\n\n\tasync addresses(geocoderId: string | Geocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _geocoderId = (geocoderId as Geocoder).id || geocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `geocoders/${_geocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(geocoderId: string | Geocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _geocoderId = (geocoderId as Geocoder).id || geocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `geocoders/${_geocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisGeocoder(resource: any): resource is Geocoder {\n\t\treturn resource.type && (resource.type === Geocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GeocoderRel {\n\t\treturn super.relationshipOneToOne<GeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GeocoderRel[] {\n\t\treturn super.relationshipOneToMany<GeocoderRel>(...ids)\n\t}\n\n\n\ttype(): GeocoderType {\n\t\treturn Geocoders.TYPE\n\t}\n\n}\n\n\nexport default Geocoders\n\nexport type { Geocoder, GeocoderType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Customer, CustomerType } from './customers'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype GiftCardRecipientType = 'gift_card_recipients'\ntype GiftCardRecipientRel = ResourceRel & { type: GiftCardRecipientType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\n\n\nexport type GiftCardRecipientSort = Pick<GiftCardRecipient, 'id'> & ResourceSort\n// export type GiftCardRecipientFilter = Pick<GiftCardRecipient, 'id' | 'email' | 'first_name' | 'last_name'> & ResourceFilter\n\n\ninterface GiftCardRecipient extends Resource {\n\t\n\treadonly type: GiftCardRecipientType\n\n\temail: string\n\tfirst_name?: string | null\n\tlast_name?: string | null\n\n\tcustomer?: Customer | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface GiftCardRecipientCreate extends ResourceCreate {\n\t\n\temail: string\n\tfirst_name?: string | null\n\tlast_name?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\ninterface GiftCardRecipientUpdate extends ResourceUpdate {\n\t\n\temail?: string | null\n\tfirst_name?: string | null\n\tlast_name?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\nclass GiftCardRecipients extends ApiResource<GiftCardRecipient> {\n\n\tstatic readonly TYPE: GiftCardRecipientType = 'gift_card_recipients' as const\n\n\tasync create(resource: GiftCardRecipientCreate, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\treturn this.resources.create<GiftCardRecipientCreate, GiftCardRecipient>({ ...resource, type: GiftCardRecipients.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GiftCardRecipientUpdate, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\treturn this.resources.update<GiftCardRecipientUpdate, GiftCardRecipient>({ ...resource, type: GiftCardRecipients.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: GiftCardRecipients.TYPE } : id, options)\n\t}\n\n\tasync customer(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `gift_card_recipients/${_giftCardRecipientId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync attachments(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `gift_card_recipients/${_giftCardRecipientId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _giftCardRecipientId = (giftCardRecipientId as GiftCardRecipient).id || giftCardRecipientId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `gift_card_recipients/${_giftCardRecipientId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisGiftCardRecipient(resource: any): resource is GiftCardRecipient {\n\t\treturn resource.type && (resource.type === GiftCardRecipients.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GiftCardRecipientRel {\n\t\treturn super.relationshipOneToOne<GiftCardRecipientRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GiftCardRecipientRel[] {\n\t\treturn super.relationshipOneToMany<GiftCardRecipientRel>(...ids)\n\t}\n\n\n\ttype(): GiftCardRecipientType {\n\t\treturn GiftCardRecipients.TYPE\n\t}\n\n}\n\n\nexport default GiftCardRecipients\n\nexport type { GiftCardRecipient, GiftCardRecipientCreate, GiftCardRecipientUpdate, GiftCardRecipientType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { GiftCardRecipient, GiftCardRecipientType } from './gift_card_recipients'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype GiftCardType = 'gift_cards'\ntype GiftCardRel = ResourceRel & { type: GiftCardType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype GiftCardRecipientRel = ResourceRel & { type: GiftCardRecipientType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type GiftCardSort = Pick<GiftCard, 'id' | 'status' | 'currency_code' | 'balance_cents' | 'balance_max_cents' | 'expires_at'> & ResourceSort\n// export type GiftCardFilter = Pick<GiftCard, 'id' | 'status' | 'code' | 'currency_code' | 'balance_cents' | 'balance_max_cents' | 'single_use' | 'rechargeable' | 'expires_at'> & ResourceFilter\n\n\ninterface GiftCard extends Resource {\n\t\n\treadonly type: GiftCardType\n\n\tstatus: 'draft' | 'inactive' | 'active' | 'redeemed'\n\tcode?: string | null\n\tcurrency_code?: string | null\n\tinitial_balance_cents: number\n\tinitial_balance_float: number\n\tformatted_initial_balance: string\n\tbalance_cents: number\n\tbalance_float: number\n\tformatted_balance: string\n\tbalance_max_cents?: string | null\n\tbalance_max_float?: number | null\n\tformatted_balance_max?: string | null\n\tbalance_log: Array<Record<string, any>>\n\tsingle_use?: boolean | null\n\trechargeable?: boolean | null\n\tdistribute_discount?: boolean | null\n\timage_url?: string | null\n\texpires_at?: string | null\n\trecipient_email?: string | null\n\n\tmarket?: Market | null\n\tgift_card_recipient?: GiftCardRecipient | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface GiftCardCreate extends ResourceCreate {\n\t\n\tcode?: string | null\n\tcurrency_code?: string | null\n\tbalance_cents: number\n\tbalance_max_cents?: string | null\n\tsingle_use?: boolean | null\n\trechargeable?: boolean | null\n\tdistribute_discount?: boolean | null\n\timage_url?: string | null\n\texpires_at?: string | null\n\trecipient_email?: string | null\n\n\tmarket?: MarketRel | null\n\tgift_card_recipient?: GiftCardRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface GiftCardUpdate extends ResourceUpdate {\n\t\n\tcurrency_code?: string | null\n\tbalance_cents?: number | null\n\tbalance_max_cents?: string | null\n\tsingle_use?: boolean | null\n\trechargeable?: boolean | null\n\tdistribute_discount?: boolean | null\n\timage_url?: string | null\n\texpires_at?: string | null\n\trecipient_email?: string | null\n\t_purchase?: boolean | null\n\t_activate?: boolean | null\n\t_deactivate?: boolean | null\n\t_balance_change_cents?: number | null\n\n\tmarket?: MarketRel | null\n\tgift_card_recipient?: GiftCardRecipientRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass GiftCards extends ApiResource<GiftCard> {\n\n\tstatic readonly TYPE: GiftCardType = 'gift_cards' as const\n\n\tasync create(resource: GiftCardCreate, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.create<GiftCardCreate, GiftCard>({ ...resource, type: GiftCards.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GiftCardUpdate, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ ...resource, type: GiftCards.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: GiftCards.TYPE } : id, options)\n\t}\n\n\tasync market(giftCardId: string | GiftCard, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `gift_cards/${_giftCardId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync gift_card_recipient(giftCardId: string | GiftCard, params?: QueryParamsRetrieve<GiftCardRecipient>, options?: ResourcesConfig): Promise<GiftCardRecipient> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<GiftCardRecipient>({ type: 'gift_card_recipients' }, `gift_cards/${_giftCardId}/gift_card_recipient`, params, options) as unknown as GiftCardRecipient\n\t}\n\n\tasync attachments(giftCardId: string | GiftCard, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `gift_cards/${_giftCardId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(giftCardId: string | GiftCard, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `gift_cards/${_giftCardId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(giftCardId: string | GiftCard, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `gift_cards/${_giftCardId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(giftCardId: string | GiftCard, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _giftCardId = (giftCardId as GiftCard).id || giftCardId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `gift_cards/${_giftCardId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _purchase(id: string | GiftCard, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _purchase: true }, params, options)\n\t}\n\n\tasync _activate(id: string | GiftCard, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _activate: true }, params, options)\n\t}\n\n\tasync _deactivate(id: string | GiftCard, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _deactivate: true }, params, options)\n\t}\n\n\tasync _balance_change_cents(id: string | GiftCard, triggerValue: number, params?: QueryParamsRetrieve<GiftCard>, options?: ResourcesConfig): Promise<GiftCard> {\n\t\treturn this.resources.update<GiftCardUpdate, GiftCard>({ id: (typeof id === 'string')? id: id.id, type: GiftCards.TYPE, _balance_change_cents: triggerValue }, params, options)\n\t}\n\n\n\tisGiftCard(resource: any): resource is GiftCard {\n\t\treturn resource.type && (resource.type === GiftCards.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GiftCardRel {\n\t\treturn super.relationshipOneToOne<GiftCardRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GiftCardRel[] {\n\t\treturn super.relationshipOneToMany<GiftCardRel>(...ids)\n\t}\n\n\n\ttype(): GiftCardType {\n\t\treturn GiftCards.TYPE\n\t}\n\n}\n\n\nexport default GiftCards\n\nexport type { GiftCard, GiftCardCreate, GiftCardUpdate, GiftCardType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Address } from './addresses'\nimport type { Attachment } from './attachments'\n\n\ntype GoogleGeocoderType = 'google_geocoders'\ntype GoogleGeocoderRel = ResourceRel & { type: GoogleGeocoderType }\n\n\nexport type GoogleGeocoderSort = Pick<GoogleGeocoder, 'id' | 'name'> & ResourceSort\n// export type GoogleGeocoderFilter = Pick<GoogleGeocoder, 'id' | 'name'> & ResourceFilter\n\n\ninterface GoogleGeocoder extends Resource {\n\t\n\treadonly type: GoogleGeocoderType\n\n\tname: string\n\n\taddresses?: Address[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\ninterface GoogleGeocoderCreate extends ResourceCreate {\n\t\n\tname: string\n\tapi_key: string\n\t\n}\n\n\ninterface GoogleGeocoderUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tapi_key?: string | null\n\t\n}\n\n\nclass GoogleGeocoders extends ApiResource<GoogleGeocoder> {\n\n\tstatic readonly TYPE: GoogleGeocoderType = 'google_geocoders' as const\n\n\tasync create(resource: GoogleGeocoderCreate, params?: QueryParamsRetrieve<GoogleGeocoder>, options?: ResourcesConfig): Promise<GoogleGeocoder> {\n\t\treturn this.resources.create<GoogleGeocoderCreate, GoogleGeocoder>({ ...resource, type: GoogleGeocoders.TYPE }, params, options)\n\t}\n\n\tasync update(resource: GoogleGeocoderUpdate, params?: QueryParamsRetrieve<GoogleGeocoder>, options?: ResourcesConfig): Promise<GoogleGeocoder> {\n\t\treturn this.resources.update<GoogleGeocoderUpdate, GoogleGeocoder>({ ...resource, type: GoogleGeocoders.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: GoogleGeocoders.TYPE } : id, options)\n\t}\n\n\tasync addresses(googleGeocoderId: string | GoogleGeocoder, params?: QueryParamsList<Address>, options?: ResourcesConfig): Promise<ListResponse<Address>> {\n\t\tconst _googleGeocoderId = (googleGeocoderId as GoogleGeocoder).id || googleGeocoderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `google_geocoders/${_googleGeocoderId}/addresses`, params, options) as unknown as ListResponse<Address>\n\t}\n\n\tasync attachments(googleGeocoderId: string | GoogleGeocoder, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _googleGeocoderId = (googleGeocoderId as GoogleGeocoder).id || googleGeocoderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `google_geocoders/${_googleGeocoderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisGoogleGeocoder(resource: any): resource is GoogleGeocoder {\n\t\treturn resource.type && (resource.type === GoogleGeocoders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): GoogleGeocoderRel {\n\t\treturn super.relationshipOneToOne<GoogleGeocoderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): GoogleGeocoderRel[] {\n\t\treturn super.relationshipOneToMany<GoogleGeocoderRel>(...ids)\n\t}\n\n\n\ttype(): GoogleGeocoderType {\n\t\treturn GoogleGeocoders.TYPE\n\t}\n\n}\n\n\nexport default GoogleGeocoders\n\nexport type { GoogleGeocoder, GoogleGeocoderCreate, GoogleGeocoderUpdate, GoogleGeocoderType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Event } from './events'\n\n\ntype ImportType = 'imports'\ntype ImportRel = ResourceRel & { type: ImportType }\n\n\nexport type ImportSort = Pick<Import, 'id' | 'resource_type' | 'format' | 'parent_resource_id' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'inputs_size' | 'errors_count' | 'warnings_count' | 'processed_count' | 'attachment_url'> & ResourceSort\n// export type ImportFilter = Pick<Import, 'id' | 'resource_type' | 'format' | 'parent_resource_id' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'inputs_size' | 'errors_count' | 'warnings_count' | 'processed_count' | 'attachment_url'> & ResourceFilter\n\n\ninterface Import extends Resource {\n\t\n\treadonly type: ImportType\n\n\tresource_type: string\n\tformat?: string | null\n\tparent_resource_id?: string | null\n\tstatus: 'pending' | 'in_progress' | 'interrupted' | 'completed'\n\tstarted_at?: string | null\n\tcompleted_at?: string | null\n\tinterrupted_at?: string | null\n\tinputs: Array<Record<string, any>>\n\tinputs_size?: number | null\n\terrors_count?: number | null\n\twarnings_count?: number | null\n\tprocessed_count?: number | null\n\terrors_log?: Record<string, any> | null\n\twarnings_log?: Record<string, any> | null\n\tattachment_url?: string | null\n\n\tevents?: Event[] | null\n\n}\n\n\ninterface ImportCreate extends ResourceCreate {\n\t\n\tresource_type: string\n\tformat?: string | null\n\tparent_resource_id?: string | null\n\tinputs: Array<Record<string, any>>\n\t\n}\n\n\nclass Imports extends ApiResource<Import> {\n\n\tstatic readonly TYPE: ImportType = 'imports' as const\n\n\tasync create(resource: ImportCreate, params?: QueryParamsRetrieve<Import>, options?: ResourcesConfig): Promise<Import> {\n\t\treturn this.resources.create<ImportCreate, Import>({ ...resource, type: Imports.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Imports.TYPE } : id, options)\n\t}\n\n\tasync events(importId: string | Import, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _importId = (importId as Import).id || importId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `imports/${_importId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\n\tisImport(resource: any): resource is Import {\n\t\treturn resource.type && (resource.type === Imports.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ImportRel {\n\t\treturn super.relationshipOneToOne<ImportRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ImportRel[] {\n\t\treturn super.relationshipOneToMany<ImportRel>(...ids)\n\t}\n\n\n\ttype(): ImportType {\n\t\treturn Imports.TYPE\n\t}\n\n}\n\n\nexport default Imports\n\nexport type { Import, ImportCreate, ImportType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { Customer, CustomerType } from './customers'\nimport type { Sku, SkuType } from './skus'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype InStockSubscriptionType = 'in_stock_subscriptions'\ntype InStockSubscriptionRel = ResourceRel & { type: InStockSubscriptionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type InStockSubscriptionSort = Pick<InStockSubscription, 'id' | 'status' | 'stock_threshold'> & ResourceSort\n// export type InStockSubscriptionFilter = Pick<InStockSubscription, 'id' | 'status' | 'stock_threshold'> & ResourceFilter\n\n\ninterface InStockSubscription extends Resource {\n\t\n\treadonly type: InStockSubscriptionType\n\n\tstatus: 'active' | 'inactive' | 'notified'\n\tcustomer_email?: string | null\n\tsku_code?: string | null\n\tstock_threshold?: number | null\n\n\tmarket?: Market | null\n\tcustomer?: Customer | null\n\tsku?: Sku | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface InStockSubscriptionCreate extends ResourceCreate {\n\t\n\tcustomer_email?: string | null\n\tsku_code?: string | null\n\tstock_threshold?: number | null\n\n\tmarket: MarketRel\n\tcustomer: CustomerRel\n\tsku: SkuRel\n\n}\n\n\ninterface InStockSubscriptionUpdate extends ResourceUpdate {\n\t\n\tsku_code?: string | null\n\tstock_threshold?: number | null\n\t_activate?: boolean | null\n\t_deactivate?: boolean | null\n\n\tmarket?: MarketRel | null\n\tcustomer?: CustomerRel | null\n\tsku?: SkuRel | null\n\n}\n\n\nclass InStockSubscriptions extends ApiResource<InStockSubscription> {\n\n\tstatic readonly TYPE: InStockSubscriptionType = 'in_stock_subscriptions' as const\n\n\tasync create(resource: InStockSubscriptionCreate, params?: QueryParamsRetrieve<InStockSubscription>, options?: ResourcesConfig): Promise<InStockSubscription> {\n\t\treturn this.resources.create<InStockSubscriptionCreate, InStockSubscription>({ ...resource, type: InStockSubscriptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: InStockSubscriptionUpdate, params?: QueryParamsRetrieve<InStockSubscription>, options?: ResourcesConfig): Promise<InStockSubscription> {\n\t\treturn this.resources.update<InStockSubscriptionUpdate, InStockSubscription>({ ...resource, type: InStockSubscriptions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: InStockSubscriptions.TYPE } : id, options)\n\t}\n\n\tasync market(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _inStockSubscriptionId = (inStockSubscriptionId as InStockSubscription).id || inStockSubscriptionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `in_stock_subscriptions/${_inStockSubscriptionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync customer(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _inStockSubscriptionId = (inStockSubscriptionId as InStockSubscription).id || inStockSubscriptionId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `in_stock_subscriptions/${_inStockSubscriptionId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync sku(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _inStockSubscriptionId = (inStockSubscriptionId as InStockSubscription).id || inStockSubscriptionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `in_stock_subscriptions/${_inStockSubscriptionId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync events(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _inStockSubscriptionId = (inStockSubscriptionId as InStockSubscription).id || inStockSubscriptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `in_stock_subscriptions/${_inStockSubscriptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _inStockSubscriptionId = (inStockSubscriptionId as InStockSubscription).id || inStockSubscriptionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `in_stock_subscriptions/${_inStockSubscriptionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _activate(id: string | InStockSubscription, params?: QueryParamsRetrieve<InStockSubscription>, options?: ResourcesConfig): Promise<InStockSubscription> {\n\t\treturn this.resources.update<InStockSubscriptionUpdate, InStockSubscription>({ id: (typeof id === 'string')? id: id.id, type: InStockSubscriptions.TYPE, _activate: true }, params, options)\n\t}\n\n\tasync _deactivate(id: string | InStockSubscription, params?: QueryParamsRetrieve<InStockSubscription>, options?: ResourcesConfig): Promise<InStockSubscription> {\n\t\treturn this.resources.update<InStockSubscriptionUpdate, InStockSubscription>({ id: (typeof id === 'string')? id: id.id, type: InStockSubscriptions.TYPE, _deactivate: true }, params, options)\n\t}\n\n\n\tisInStockSubscription(resource: any): resource is InStockSubscription {\n\t\treturn resource.type && (resource.type === InStockSubscriptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): InStockSubscriptionRel {\n\t\treturn super.relationshipOneToOne<InStockSubscriptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): InStockSubscriptionRel[] {\n\t\treturn super.relationshipOneToMany<InStockSubscriptionRel>(...ids)\n\t}\n\n\n\ttype(): InStockSubscriptionType {\n\t\treturn InStockSubscriptions.TYPE\n\t}\n\n}\n\n\nexport default InStockSubscriptions\n\nexport type { InStockSubscription, InStockSubscriptionCreate, InStockSubscriptionUpdate, InStockSubscriptionType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { InventoryStockLocation } from './inventory_stock_locations'\nimport type { InventoryReturnLocation } from './inventory_return_locations'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype InventoryModelType = 'inventory_models'\ntype InventoryModelRel = ResourceRel & { type: InventoryModelType }\n\n\nexport type InventoryModelSort = Pick<InventoryModel, 'id' | 'name' | 'strategy' | 'stock_locations_cutoff' | 'stock_reservation_cutoff'> & ResourceSort\n// export type InventoryModelFilter = Pick<InventoryModel, 'id' | 'name' | 'strategy' | 'stock_locations_cutoff' | 'stock_reservation_cutoff'> & ResourceFilter\n\n\ninterface InventoryModel extends Resource {\n\t\n\treadonly type: InventoryModelType\n\n\tname: string\n\tstrategy?: string | null\n\tstock_locations_cutoff?: number | null\n\tstock_reservation_cutoff?: number | null\n\tput_stock_transfers_on_hold?: boolean | null\n\tmanual_stock_decrement?: boolean | null\n\n\tinventory_stock_locations?: InventoryStockLocation[] | null\n\tinventory_return_locations?: InventoryReturnLocation[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface InventoryModelCreate extends ResourceCreate {\n\t\n\tname: string\n\tstrategy?: string | null\n\tstock_locations_cutoff?: number | null\n\tstock_reservation_cutoff?: number | null\n\tput_stock_transfers_on_hold?: boolean | null\n\tmanual_stock_decrement?: boolean | null\n\t\n}\n\n\ninterface InventoryModelUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tstrategy?: string | null\n\tstock_locations_cutoff?: number | null\n\tstock_reservation_cutoff?: number | null\n\tput_stock_transfers_on_hold?: boolean | null\n\tmanual_stock_decrement?: boolean | null\n\t\n}\n\n\nclass InventoryModels extends ApiResource<InventoryModel> {\n\n\tstatic readonly TYPE: InventoryModelType = 'inventory_models' as const\n\n\tasync create(resource: InventoryModelCreate, params?: QueryParamsRetrieve<InventoryModel>, options?: ResourcesConfig): Promise<InventoryModel> {\n\t\treturn this.resources.create<InventoryModelCreate, InventoryModel>({ ...resource, type: InventoryModels.TYPE }, params, options)\n\t}\n\n\tasync update(resource: InventoryModelUpdate, params?: QueryParamsRetrieve<InventoryModel>, options?: ResourcesConfig): Promise<InventoryModel> {\n\t\treturn this.resources.update<InventoryModelUpdate, InventoryModel>({ ...resource, type: InventoryModels.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: InventoryModels.TYPE } : id, options)\n\t}\n\n\tasync inventory_stock_locations(inventoryModelId: string | InventoryModel, params?: QueryParamsList<InventoryStockLocation>, options?: ResourcesConfig): Promise<ListResponse<InventoryStockLocation>> {\n\t\tconst _inventoryModelId = (inventoryModelId as InventoryModel).id || inventoryModelId as string\n\t\treturn this.resources.fetch<InventoryStockLocation>({ type: 'inventory_stock_locations' }, `inventory_models/${_inventoryModelId}/inventory_stock_locations`, params, options) as unknown as ListResponse<InventoryStockLocation>\n\t}\n\n\tasync inventory_return_locations(inventoryModelId: string | InventoryModel, params?: QueryParamsList<InventoryReturnLocation>, options?: ResourcesConfig): Promise<ListResponse<InventoryReturnLocation>> {\n\t\tconst _inventoryModelId = (inventoryModelId as InventoryModel).id || inventoryModelId as string\n\t\treturn this.resources.fetch<InventoryReturnLocation>({ type: 'inventory_return_locations' }, `inventory_models/${_inventoryModelId}/inventory_return_locations`, params, options) as unknown as ListResponse<InventoryReturnLocation>\n\t}\n\n\tasync attachments(inventoryModelId: string | InventoryModel, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _inventoryModelId = (inventoryModelId as InventoryModel).id || inventoryModelId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `inventory_models/${_inventoryModelId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(inventoryModelId: string | InventoryModel, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _inventoryModelId = (inventoryModelId as InventoryModel).id || inventoryModelId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `inventory_models/${_inventoryModelId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisInventoryModel(resource: any): resource is InventoryModel {\n\t\treturn resource.type && (resource.type === InventoryModels.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): InventoryModelRel {\n\t\treturn super.relationshipOneToOne<InventoryModelRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): InventoryModelRel[] {\n\t\treturn super.relationshipOneToMany<InventoryModelRel>(...ids)\n\t}\n\n\n\ttype(): InventoryModelType {\n\t\treturn InventoryModels.TYPE\n\t}\n\n}\n\n\nexport default InventoryModels\n\nexport type { InventoryModel, InventoryModelCreate, InventoryModelUpdate, InventoryModelType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { InventoryModel, InventoryModelType } from './inventory_models'\nimport type { Version } from './versions'\n\n\ntype InventoryReturnLocationType = 'inventory_return_locations'\ntype InventoryReturnLocationRel = ResourceRel & { type: InventoryReturnLocationType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype InventoryModelRel = ResourceRel & { type: InventoryModelType }\n\n\nexport type InventoryReturnLocationSort = Pick<InventoryReturnLocation, 'id' | 'priority'> & ResourceSort\n// export type InventoryReturnLocationFilter = Pick<InventoryReturnLocation, 'id' | 'priority'> & ResourceFilter\n\n\ninterface InventoryReturnLocation extends Resource {\n\t\n\treadonly type: InventoryReturnLocationType\n\n\tpriority: number\n\n\tstock_location?: StockLocation | null\n\tinventory_model?: InventoryModel | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface InventoryReturnLocationCreate extends ResourceCreate {\n\t\n\tpriority: number\n\n\tstock_location: StockLocationRel\n\tinventory_model: InventoryModelRel\n\n}\n\n\ninterface InventoryReturnLocationUpdate extends ResourceUpdate {\n\t\n\tpriority?: number | null\n\n\tstock_location?: StockLocationRel | null\n\tinventory_model?: InventoryModelRel | null\n\n}\n\n\nclass InventoryReturnLocations extends ApiResource<InventoryReturnLocation> {\n\n\tstatic readonly TYPE: InventoryReturnLocationType = 'inventory_return_locations' as const\n\n\tasync create(resource: InventoryReturnLocationCreate, params?: QueryParamsRetrieve<InventoryReturnLocation>, options?: ResourcesConfig): Promise<InventoryReturnLocation> {\n\t\treturn this.resources.create<InventoryReturnLocationCreate, InventoryReturnLocation>({ ...resource, type: InventoryReturnLocations.TYPE }, params, options)\n\t}\n\n\tasync update(resource: InventoryReturnLocationUpdate, params?: QueryParamsRetrieve<InventoryReturnLocation>, options?: ResourcesConfig): Promise<InventoryReturnLocation> {\n\t\treturn this.resources.update<InventoryReturnLocationUpdate, InventoryReturnLocation>({ ...resource, type: InventoryReturnLocations.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: InventoryReturnLocations.TYPE } : id, options)\n\t}\n\n\tasync stock_location(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _inventoryReturnLocationId = (inventoryReturnLocationId as InventoryReturnLocation).id || inventoryReturnLocationId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `inventory_return_locations/${_inventoryReturnLocationId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync inventory_model(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsRetrieve<InventoryModel>, options?: ResourcesConfig): Promise<InventoryModel> {\n\t\tconst _inventoryReturnLocationId = (inventoryReturnLocationId as InventoryReturnLocation).id || inventoryReturnLocationId as string\n\t\treturn this.resources.fetch<InventoryModel>({ type: 'inventory_models' }, `inventory_return_locations/${_inventoryReturnLocationId}/inventory_model`, params, options) as unknown as InventoryModel\n\t}\n\n\tasync versions(inventoryReturnLocationId: string | InventoryReturnLocation, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _inventoryReturnLocationId = (inventoryReturnLocationId as InventoryReturnLocation).id || inventoryReturnLocationId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `inventory_return_locations/${_inventoryReturnLocationId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisInventoryReturnLocation(resource: any): resource is InventoryReturnLocation {\n\t\treturn resource.type && (resource.type === InventoryReturnLocations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): InventoryReturnLocationRel {\n\t\treturn super.relationshipOneToOne<InventoryReturnLocationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): InventoryReturnLocationRel[] {\n\t\treturn super.relationshipOneToMany<InventoryReturnLocationRel>(...ids)\n\t}\n\n\n\ttype(): InventoryReturnLocationType {\n\t\treturn InventoryReturnLocations.TYPE\n\t}\n\n}\n\n\nexport default InventoryReturnLocations\n\nexport type { InventoryReturnLocation, InventoryReturnLocationCreate, InventoryReturnLocationUpdate, InventoryReturnLocationType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { InventoryModel, InventoryModelType } from './inventory_models'\nimport type { Version } from './versions'\n\n\ntype InventoryStockLocationType = 'inventory_stock_locations'\ntype InventoryStockLocationRel = ResourceRel & { type: InventoryStockLocationType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype InventoryModelRel = ResourceRel & { type: InventoryModelType }\n\n\nexport type InventoryStockLocationSort = Pick<InventoryStockLocation, 'id' | 'priority' | 'on_hold'> & ResourceSort\n// export type InventoryStockLocationFilter = Pick<InventoryStockLocation, 'id' | 'priority' | 'on_hold'> & ResourceFilter\n\n\ninterface InventoryStockLocation extends Resource {\n\t\n\treadonly type: InventoryStockLocationType\n\n\tpriority: number\n\ton_hold?: boolean | null\n\n\tstock_location?: StockLocation | null\n\tinventory_model?: InventoryModel | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface InventoryStockLocationCreate extends ResourceCreate {\n\t\n\tpriority: number\n\ton_hold?: boolean | null\n\n\tstock_location: StockLocationRel\n\tinventory_model: InventoryModelRel\n\n}\n\n\ninterface InventoryStockLocationUpdate extends ResourceUpdate {\n\t\n\tpriority?: number | null\n\ton_hold?: boolean | null\n\n\tstock_location?: StockLocationRel | null\n\tinventory_model?: InventoryModelRel | null\n\n}\n\n\nclass InventoryStockLocations extends ApiResource<InventoryStockLocation> {\n\n\tstatic readonly TYPE: InventoryStockLocationType = 'inventory_stock_locations' as const\n\n\tasync create(resource: InventoryStockLocationCreate, params?: QueryParamsRetrieve<InventoryStockLocation>, options?: ResourcesConfig): Promise<InventoryStockLocation> {\n\t\treturn this.resources.create<InventoryStockLocationCreate, InventoryStockLocation>({ ...resource, type: InventoryStockLocations.TYPE }, params, options)\n\t}\n\n\tasync update(resource: InventoryStockLocationUpdate, params?: QueryParamsRetrieve<InventoryStockLocation>, options?: ResourcesConfig): Promise<InventoryStockLocation> {\n\t\treturn this.resources.update<InventoryStockLocationUpdate, InventoryStockLocation>({ ...resource, type: InventoryStockLocations.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: InventoryStockLocations.TYPE } : id, options)\n\t}\n\n\tasync stock_location(inventoryStockLocationId: string | InventoryStockLocation, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _inventoryStockLocationId = (inventoryStockLocationId as InventoryStockLocation).id || inventoryStockLocationId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `inventory_stock_locations/${_inventoryStockLocationId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync inventory_model(inventoryStockLocationId: string | InventoryStockLocation, params?: QueryParamsRetrieve<InventoryModel>, options?: ResourcesConfig): Promise<InventoryModel> {\n\t\tconst _inventoryStockLocationId = (inventoryStockLocationId as InventoryStockLocation).id || inventoryStockLocationId as string\n\t\treturn this.resources.fetch<InventoryModel>({ type: 'inventory_models' }, `inventory_stock_locations/${_inventoryStockLocationId}/inventory_model`, params, options) as unknown as InventoryModel\n\t}\n\n\tasync versions(inventoryStockLocationId: string | InventoryStockLocation, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _inventoryStockLocationId = (inventoryStockLocationId as InventoryStockLocation).id || inventoryStockLocationId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `inventory_stock_locations/${_inventoryStockLocationId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisInventoryStockLocation(resource: any): resource is InventoryStockLocation {\n\t\treturn resource.type && (resource.type === InventoryStockLocations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): InventoryStockLocationRel {\n\t\treturn super.relationshipOneToOne<InventoryStockLocationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): InventoryStockLocationRel[] {\n\t\treturn super.relationshipOneToMany<InventoryStockLocationRel>(...ids)\n\t}\n\n\n\ttype(): InventoryStockLocationType {\n\t\treturn InventoryStockLocations.TYPE\n\t}\n\n}\n\n\nexport default InventoryStockLocations\n\nexport type { InventoryStockLocation, InventoryStockLocationCreate, InventoryStockLocationUpdate, InventoryStockLocationType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { KlarnaPayment, KlarnaPaymentType } from './klarna_payments'\n\n\ntype KlarnaGatewayType = 'klarna_gateways'\ntype KlarnaGatewayRel = ResourceRel & { type: KlarnaGatewayType }\ntype KlarnaPaymentRel = ResourceRel & { type: KlarnaPaymentType }\n\n\nexport type KlarnaGatewaySort = Pick<KlarnaGateway, 'id' | 'name'> & ResourceSort\n// export type KlarnaGatewayFilter = Pick<KlarnaGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface KlarnaGateway extends Resource {\n\t\n\treadonly type: KlarnaGatewayType\n\n\tname: string\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tklarna_payments?: KlarnaPayment[] | null\n\n}\n\n\ninterface KlarnaGatewayCreate extends ResourceCreate {\n\t\n\tname: string\n\tcountry_code: string\n\tapi_key: string\n\tapi_secret: string\n\n\tklarna_payments?: KlarnaPaymentRel[] | null\n\n}\n\n\ninterface KlarnaGatewayUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tcountry_code?: string | null\n\tapi_key?: string | null\n\tapi_secret?: string | null\n\n\tklarna_payments?: KlarnaPaymentRel[] | null\n\n}\n\n\nclass KlarnaGateways extends ApiResource<KlarnaGateway> {\n\n\tstatic readonly TYPE: KlarnaGatewayType = 'klarna_gateways' as const\n\n\tasync create(resource: KlarnaGatewayCreate, params?: QueryParamsRetrieve<KlarnaGateway>, options?: ResourcesConfig): Promise<KlarnaGateway> {\n\t\treturn this.resources.create<KlarnaGatewayCreate, KlarnaGateway>({ ...resource, type: KlarnaGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: KlarnaGatewayUpdate, params?: QueryParamsRetrieve<KlarnaGateway>, options?: ResourcesConfig): Promise<KlarnaGateway> {\n\t\treturn this.resources.update<KlarnaGatewayUpdate, KlarnaGateway>({ ...resource, type: KlarnaGateways.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: KlarnaGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _klarnaGatewayId = (klarnaGatewayId as KlarnaGateway).id || klarnaGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `klarna_gateways/${_klarnaGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _klarnaGatewayId = (klarnaGatewayId as KlarnaGateway).id || klarnaGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `klarna_gateways/${_klarnaGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync klarna_payments(klarnaGatewayId: string | KlarnaGateway, params?: QueryParamsList<KlarnaPayment>, options?: ResourcesConfig): Promise<ListResponse<KlarnaPayment>> {\n\t\tconst _klarnaGatewayId = (klarnaGatewayId as KlarnaGateway).id || klarnaGatewayId as string\n\t\treturn this.resources.fetch<KlarnaPayment>({ type: 'klarna_payments' }, `klarna_gateways/${_klarnaGatewayId}/klarna_payments`, params, options) as unknown as ListResponse<KlarnaPayment>\n\t}\n\n\n\tisKlarnaGateway(resource: any): resource is KlarnaGateway {\n\t\treturn resource.type && (resource.type === KlarnaGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): KlarnaGatewayRel {\n\t\treturn super.relationshipOneToOne<KlarnaGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): KlarnaGatewayRel[] {\n\t\treturn super.relationshipOneToMany<KlarnaGatewayRel>(...ids)\n\t}\n\n\n\ttype(): KlarnaGatewayType {\n\t\treturn KlarnaGateways.TYPE\n\t}\n\n}\n\n\nexport default KlarnaGateways\n\nexport type { KlarnaGateway, KlarnaGatewayCreate, KlarnaGatewayUpdate, KlarnaGatewayType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype KlarnaPaymentType = 'klarna_payments'\ntype KlarnaPaymentRel = ResourceRel & { type: KlarnaPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type KlarnaPaymentSort = Pick<KlarnaPayment, 'id'> & ResourceSort\n// export type KlarnaPaymentFilter = Pick<KlarnaPayment, 'id' | 'mismatched_amounts'> & ResourceFilter\n\n\ninterface KlarnaPayment extends Resource {\n\t\n\treadonly type: KlarnaPaymentType\n\n\tsession_id?: string | null\n\tclient_token?: string | null\n\tpayment_methods: Array<Record<string, any>>\n\tauth_token?: string | null\n\tmismatched_amounts?: boolean | null\n\tintent_amount_cents: number\n\tintent_amount_float?: number | null\n\tformatted_intent_amount?: string | null\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface KlarnaPaymentCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\n}\n\n\ninterface KlarnaPaymentUpdate extends ResourceUpdate {\n\t\n\tauth_token?: string | null\n\t_update?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass KlarnaPayments extends ApiResource<KlarnaPayment> {\n\n\tstatic readonly TYPE: KlarnaPaymentType = 'klarna_payments' as const\n\n\tasync create(resource: KlarnaPaymentCreate, params?: QueryParamsRetrieve<KlarnaPayment>, options?: ResourcesConfig): Promise<KlarnaPayment> {\n\t\treturn this.resources.create<KlarnaPaymentCreate, KlarnaPayment>({ ...resource, type: KlarnaPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: KlarnaPaymentUpdate, params?: QueryParamsRetrieve<KlarnaPayment>, options?: ResourcesConfig): Promise<KlarnaPayment> {\n\t\treturn this.resources.update<KlarnaPaymentUpdate, KlarnaPayment>({ ...resource, type: KlarnaPayments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: KlarnaPayments.TYPE } : id, options)\n\t}\n\n\tasync order(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _klarnaPaymentId = (klarnaPaymentId as KlarnaPayment).id || klarnaPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `klarna_payments/${_klarnaPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _klarnaPaymentId = (klarnaPaymentId as KlarnaPayment).id || klarnaPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `klarna_payments/${_klarnaPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(klarnaPaymentId: string | KlarnaPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _klarnaPaymentId = (klarnaPaymentId as KlarnaPayment).id || klarnaPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `klarna_payments/${_klarnaPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _update(id: string | KlarnaPayment, params?: QueryParamsRetrieve<KlarnaPayment>, options?: ResourcesConfig): Promise<KlarnaPayment> {\n\t\treturn this.resources.update<KlarnaPaymentUpdate, KlarnaPayment>({ id: (typeof id === 'string')? id: id.id, type: KlarnaPayments.TYPE, _update: true }, params, options)\n\t}\n\n\n\tisKlarnaPayment(resource: any): resource is KlarnaPayment {\n\t\treturn resource.type && (resource.type === KlarnaPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): KlarnaPaymentRel {\n\t\treturn super.relationshipOneToOne<KlarnaPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): KlarnaPaymentRel[] {\n\t\treturn super.relationshipOneToMany<KlarnaPaymentRel>(...ids)\n\t}\n\n\n\ttype(): KlarnaPaymentType {\n\t\treturn KlarnaPayments.TYPE\n\t}\n\n}\n\n\nexport default KlarnaPayments\n\nexport type { KlarnaPayment, KlarnaPaymentCreate, KlarnaPaymentUpdate, KlarnaPaymentType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { LineItem, LineItemType } from './line_items'\nimport type { SkuOption, SkuOptionType } from './sku_options'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\n\n\ntype LineItemOptionType = 'line_item_options'\ntype LineItemOptionRel = ResourceRel & { type: LineItemOptionType }\ntype LineItemRel = ResourceRel & { type: LineItemType }\ntype SkuOptionRel = ResourceRel & { type: SkuOptionType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type LineItemOptionSort = Pick<LineItemOption, 'id' | 'name' | 'quantity' | 'currency_code' | 'unit_amount_cents' | 'delay_hours'> & ResourceSort\n// export type LineItemOptionFilter = Pick<LineItemOption, 'id' | 'name' | 'quantity' | 'currency_code' | 'unit_amount_cents' | 'delay_hours' | 'delay_days'> & ResourceFilter\n\n\ninterface LineItemOption extends Resource {\n\t\n\treadonly type: LineItemOptionType\n\n\tname?: string | null\n\tquantity: number\n\tcurrency_code?: string | null\n\tunit_amount_cents?: number | null\n\tunit_amount_float?: number | null\n\tformatted_unit_amount?: string | null\n\ttotal_amount_cents?: number | null\n\ttotal_amount_float: number\n\tformatted_total_amount?: string | null\n\tdelay_hours?: number | null\n\tdelay_days?: number | null\n\toptions: Record<string, any>\n\n\tline_item?: LineItem | null\n\tsku_option?: SkuOption | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\n}\n\n\ninterface LineItemOptionCreate extends ResourceCreate {\n\t\n\tname?: string | null\n\tquantity: number\n\toptions: Record<string, any>\n\n\tline_item: LineItemRel\n\tsku_option: SkuOptionRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface LineItemOptionUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tquantity?: number | null\n\toptions?: Record<string, any> | null\n\n\tsku_option?: SkuOptionRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass LineItemOptions extends ApiResource<LineItemOption> {\n\n\tstatic readonly TYPE: LineItemOptionType = 'line_item_options' as const\n\n\tasync create(resource: LineItemOptionCreate, params?: QueryParamsRetrieve<LineItemOption>, options?: ResourcesConfig): Promise<LineItemOption> {\n\t\treturn this.resources.create<LineItemOptionCreate, LineItemOption>({ ...resource, type: LineItemOptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: LineItemOptionUpdate, params?: QueryParamsRetrieve<LineItemOption>, options?: ResourcesConfig): Promise<LineItemOption> {\n\t\treturn this.resources.update<LineItemOptionUpdate, LineItemOption>({ ...resource, type: LineItemOptions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: LineItemOptions.TYPE } : id, options)\n\t}\n\n\tasync line_item(lineItemOptionId: string | LineItemOption, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\tconst _lineItemOptionId = (lineItemOptionId as LineItemOption).id || lineItemOptionId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `line_item_options/${_lineItemOptionId}/line_item`, params, options) as unknown as LineItem\n\t}\n\n\tasync sku_option(lineItemOptionId: string | LineItemOption, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\tconst _lineItemOptionId = (lineItemOptionId as LineItemOption).id || lineItemOptionId as string\n\t\treturn this.resources.fetch<SkuOption>({ type: 'sku_options' }, `line_item_options/${_lineItemOptionId}/sku_option`, params, options) as unknown as SkuOption\n\t}\n\n\tasync events(lineItemOptionId: string | LineItemOption, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _lineItemOptionId = (lineItemOptionId as LineItemOption).id || lineItemOptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `line_item_options/${_lineItemOptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(lineItemOptionId: string | LineItemOption, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _lineItemOptionId = (lineItemOptionId as LineItemOption).id || lineItemOptionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `line_item_options/${_lineItemOptionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\n\tisLineItemOption(resource: any): resource is LineItemOption {\n\t\treturn resource.type && (resource.type === LineItemOptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): LineItemOptionRel {\n\t\treturn super.relationshipOneToOne<LineItemOptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): LineItemOptionRel[] {\n\t\treturn super.relationshipOneToMany<LineItemOptionRel>(...ids)\n\t}\n\n\n\ttype(): LineItemOptionType {\n\t\treturn LineItemOptions.TYPE\n\t}\n\n}\n\n\nexport default LineItemOptions\n\nexport type { LineItemOption, LineItemOptionCreate, LineItemOptionUpdate, LineItemOptionType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { Adjustment, AdjustmentType } from './adjustments'\nimport type { Bundle, BundleType } from './bundles'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { GiftCard, GiftCardType } from './gift_cards'\nimport type { PaymentMethod, PaymentMethodType } from './payment_methods'\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { Shipment, ShipmentType } from './shipments'\nimport type { Sku, SkuType } from './skus'\nimport type { LineItemOption } from './line_item_options'\nimport type { ReturnLineItem } from './return_line_items'\nimport type { StockReservation } from './stock_reservations'\nimport type { StockLineItem } from './stock_line_items'\nimport type { StockTransfer } from './stock_transfers'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\n\n\ntype LineItemType = 'line_items'\ntype LineItemRel = ResourceRel & { type: LineItemType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype AdjustmentRel = ResourceRel & { type: AdjustmentType }\ntype BundleRel = ResourceRel & { type: BundleType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype GiftCardRel = ResourceRel & { type: GiftCardType }\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype SkuRel = ResourceRel & { type: SkuType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type LineItemSort = Pick<LineItem, 'id' | 'currency_code' | 'unit_amount_cents' | 'compare_at_amount_cents' | 'options_amount_cents' | 'discount_cents' | 'total_amount_cents' | 'tax_amount_cents' | 'name' | 'item_type' | 'coupon_code' | 'circuit_state' | 'circuit_failure_count'> & ResourceSort\n// export type LineItemFilter = Pick<LineItem, 'id' | 'quantity' | 'currency_code' | 'unit_amount_cents' | 'compare_at_amount_cents' | 'options_amount_cents' | 'discount_cents' | 'total_amount_cents' | 'tax_amount_cents' | 'name' | 'image_url' | 'item_type' | 'coupon_code' | 'circuit_state' | 'circuit_failure_count'> & ResourceFilter\n\n\ninterface LineItem extends Resource {\n\t\n\treadonly type: LineItemType\n\n\tsku_code?: string | null\n\tbundle_code?: string | null\n\tquantity: number\n\t_external_price?: boolean | null\n\tcurrency_code?: string | null\n\tunit_amount_cents?: number | null\n\tunit_amount_float?: number | null\n\tformatted_unit_amount?: string | null\n\tcompare_at_amount_cents?: number | null\n\tcompare_at_amount_float?: number | null\n\tformatted_compare_at_amount?: string | null\n\toptions_amount_cents?: number | null\n\toptions_amount_float?: number | null\n\tformatted_options_amount?: string | null\n\tdiscount_cents?: number | null\n\tdiscount_float?: number | null\n\tformatted_discount?: string | null\n\ttotal_amount_cents?: number | null\n\ttotal_amount_float: number\n\tformatted_total_amount?: string | null\n\ttax_amount_cents?: number | null\n\ttax_amount_float: number\n\tformatted_tax_amount?: string | null\n\tname?: string | null\n\timage_url?: string | null\n\tdiscount_breakdown?: Record<string, any> | null\n\ttax_rate?: number | null\n\ttax_breakdown?: Record<string, any> | null\n\titem_type?: 'skus' | 'bundles' | 'shipments' | 'payment_methods' | 'adjustments' | 'gift_cards' | 'percentage_discount_promotions' | 'free_shipping_promotions' | 'free_gift_promotions' | 'fixed_price_promotions' | 'external_promotions' | 'fixed_amount_promotions' | null\n\tfrequency?: string | null\n\tcoupon_code?: string | null\n\tcircuit_state?: string | null\n\tcircuit_failure_count?: number | null\n\n\torder?: Order | null\n\titem?: Adjustment | Bundle | ExternalPromotion | FixedAmountPromotion | FreeShippingPromotion | GiftCard | PaymentMethod | PercentageDiscountPromotion | Shipment | Sku | null\n\tsku?: Sku | null\n\tbundle?: Bundle | null\n\tadjustment?: Adjustment | null\n\tgift_card?: GiftCard | null\n\tshipment?: Shipment | null\n\tpayment_method?: PaymentMethod | null\n\tline_item_options?: LineItemOption[] | null\n\treturn_line_items?: ReturnLineItem[] | null\n\tstock_reservations?: StockReservation[] | null\n\tstock_line_items?: StockLineItem[] | null\n\tstock_transfers?: StockTransfer[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\n}\n\n\ninterface LineItemCreate extends ResourceCreate {\n\t\n\tsku_code?: string | null\n\tbundle_code?: string | null\n\tquantity: number\n\t_external_price?: boolean | null\n\t_update_quantity?: boolean | null\n\t_reserve_stock?: boolean | null\n\tunit_amount_cents?: number | null\n\tcompare_at_amount_cents?: number | null\n\tname?: string | null\n\timage_url?: string | null\n\titem_type?: 'skus' | 'bundles' | 'shipments' | 'payment_methods' | 'adjustments' | 'gift_cards' | 'percentage_discount_promotions' | 'free_shipping_promotions' | 'free_gift_promotions' | 'fixed_price_promotions' | 'external_promotions' | 'fixed_amount_promotions' | null\n\tfrequency?: string | null\n\n\torder: OrderRel\n\titem?: AdjustmentRel | BundleRel | ExternalPromotionRel | FixedAmountPromotionRel | FreeShippingPromotionRel | GiftCardRel | PaymentMethodRel | PercentageDiscountPromotionRel | ShipmentRel | SkuRel | null\n\tsku?: SkuRel | null\n\tbundle?: BundleRel | null\n\tadjustment?: AdjustmentRel | null\n\tgift_card?: GiftCardRel | null\n\tshipment?: ShipmentRel | null\n\tpayment_method?: PaymentMethodRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface LineItemUpdate extends ResourceUpdate {\n\t\n\tsku_code?: string | null\n\tbundle_code?: string | null\n\tquantity?: number | null\n\t_external_price?: boolean | null\n\t_reserve_stock?: boolean | null\n\tcompare_at_amount_cents?: number | null\n\tname?: string | null\n\timage_url?: string | null\n\tfrequency?: string | null\n\t_reset_circuit?: boolean | null\n\n\ttags?: TagRel[] | null\n\n}\n\n\nclass LineItems extends ApiResource<LineItem> {\n\n\tstatic readonly TYPE: LineItemType = 'line_items' as const\n\n\tasync create(resource: LineItemCreate, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.create<LineItemCreate, LineItem>({ ...resource, type: LineItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: LineItemUpdate, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ ...resource, type: LineItems.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: LineItems.TYPE } : id, options)\n\t}\n\n\tasync order(lineItemId: string | LineItem, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `line_items/${_lineItemId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync line_item_options(lineItemId: string | LineItem, params?: QueryParamsList<LineItemOption>, options?: ResourcesConfig): Promise<ListResponse<LineItemOption>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<LineItemOption>({ type: 'line_item_options' }, `line_items/${_lineItemId}/line_item_options`, params, options) as unknown as ListResponse<LineItemOption>\n\t}\n\n\tasync return_line_items(lineItemId: string | LineItem, params?: QueryParamsList<ReturnLineItem>, options?: ResourcesConfig): Promise<ListResponse<ReturnLineItem>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<ReturnLineItem>({ type: 'return_line_items' }, `line_items/${_lineItemId}/return_line_items`, params, options) as unknown as ListResponse<ReturnLineItem>\n\t}\n\n\tasync stock_reservations(lineItemId: string | LineItem, params?: QueryParamsList<StockReservation>, options?: ResourcesConfig): Promise<ListResponse<StockReservation>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `line_items/${_lineItemId}/stock_reservations`, params, options) as unknown as ListResponse<StockReservation>\n\t}\n\n\tasync stock_line_items(lineItemId: string | LineItem, params?: QueryParamsList<StockLineItem>, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<StockLineItem>({ type: 'stock_line_items' }, `line_items/${_lineItemId}/stock_line_items`, params, options) as unknown as ListResponse<StockLineItem>\n\t}\n\n\tasync stock_transfers(lineItemId: string | LineItem, params?: QueryParamsList<StockTransfer>, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<StockTransfer>({ type: 'stock_transfers' }, `line_items/${_lineItemId}/stock_transfers`, params, options) as unknown as ListResponse<StockTransfer>\n\t}\n\n\tasync events(lineItemId: string | LineItem, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `line_items/${_lineItemId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(lineItemId: string | LineItem, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _lineItemId = (lineItemId as LineItem).id || lineItemId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `line_items/${_lineItemId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync _external_price(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ id: (typeof id === 'string')? id: id.id, type: LineItems.TYPE, _external_price: true }, params, options)\n\t}\n\n\tasync _reserve_stock(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ id: (typeof id === 'string')? id: id.id, type: LineItems.TYPE, _reserve_stock: true }, params, options)\n\t}\n\n\tasync _reset_circuit(id: string | LineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\treturn this.resources.update<LineItemUpdate, LineItem>({ id: (typeof id === 'string')? id: id.id, type: LineItems.TYPE, _reset_circuit: true }, params, options)\n\t}\n\n\n\tisLineItem(resource: any): resource is LineItem {\n\t\treturn resource.type && (resource.type === LineItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): LineItemRel {\n\t\treturn super.relationshipOneToOne<LineItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): LineItemRel[] {\n\t\treturn super.relationshipOneToMany<LineItemRel>(...ids)\n\t}\n\n\n\ttype(): LineItemType {\n\t\treturn LineItems.TYPE\n\t}\n\n}\n\n\nexport default LineItems\n\nexport type { LineItem, LineItemCreate, LineItemUpdate, LineItemType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\n\n\ntype ManualGatewayType = 'manual_gateways'\ntype ManualGatewayRel = ResourceRel & { type: ManualGatewayType }\n\n\nexport type ManualGatewaySort = Pick<ManualGateway, 'id' | 'name'> & ResourceSort\n// export type ManualGatewayFilter = Pick<ManualGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface ManualGateway extends Resource {\n\t\n\treadonly type: ManualGatewayType\n\n\tname: string\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ManualGatewayCreate extends ResourceCreate {\n\t\n\tname: string\n\t\n}\n\n\ninterface ManualGatewayUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\t\n}\n\n\nclass ManualGateways extends ApiResource<ManualGateway> {\n\n\tstatic readonly TYPE: ManualGatewayType = 'manual_gateways' as const\n\n\tasync create(resource: ManualGatewayCreate, params?: QueryParamsRetrieve<ManualGateway>, options?: ResourcesConfig): Promise<ManualGateway> {\n\t\treturn this.resources.create<ManualGatewayCreate, ManualGateway>({ ...resource, type: ManualGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ManualGatewayUpdate, params?: QueryParamsRetrieve<ManualGateway>, options?: ResourcesConfig): Promise<ManualGateway> {\n\t\treturn this.resources.update<ManualGatewayUpdate, ManualGateway>({ ...resource, type: ManualGateways.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: ManualGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(manualGatewayId: string | ManualGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _manualGatewayId = (manualGatewayId as ManualGateway).id || manualGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `manual_gateways/${_manualGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(manualGatewayId: string | ManualGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _manualGatewayId = (manualGatewayId as ManualGateway).id || manualGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `manual_gateways/${_manualGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisManualGateway(resource: any): resource is ManualGateway {\n\t\treturn resource.type && (resource.type === ManualGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ManualGatewayRel {\n\t\treturn super.relationshipOneToOne<ManualGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ManualGatewayRel[] {\n\t\treturn super.relationshipOneToMany<ManualGatewayRel>(...ids)\n\t}\n\n\n\ttype(): ManualGatewayType {\n\t\treturn ManualGateways.TYPE\n\t}\n\n}\n\n\nexport default ManualGateways\n\nexport type { ManualGateway, ManualGatewayCreate, ManualGatewayUpdate, ManualGatewayType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { TaxRule, TaxRuleType } from './tax_rules'\n\n\ntype ManualTaxCalculatorType = 'manual_tax_calculators'\ntype ManualTaxCalculatorRel = ResourceRel & { type: ManualTaxCalculatorType }\ntype TaxRuleRel = ResourceRel & { type: TaxRuleType }\n\n\nexport type ManualTaxCalculatorSort = Pick<ManualTaxCalculator, 'id' | 'name'> & ResourceSort\n// export type ManualTaxCalculatorFilter = Pick<ManualTaxCalculator, 'id' | 'name'> & ResourceFilter\n\n\ninterface ManualTaxCalculator extends Resource {\n\t\n\treadonly type: ManualTaxCalculatorType\n\n\tname: string\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\ttax_rules?: TaxRule[] | null\n\n}\n\n\ninterface ManualTaxCalculatorCreate extends ResourceCreate {\n\t\n\tname: string\n\n\ttax_rules?: TaxRuleRel[] | null\n\n}\n\n\ninterface ManualTaxCalculatorUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\n\ttax_rules?: TaxRuleRel[] | null\n\n}\n\n\nclass ManualTaxCalculators extends ApiResource<ManualTaxCalculator> {\n\n\tstatic readonly TYPE: ManualTaxCalculatorType = 'manual_tax_calculators' as const\n\n\tasync create(resource: ManualTaxCalculatorCreate, params?: QueryParamsRetrieve<ManualTaxCalculator>, options?: ResourcesConfig): Promise<ManualTaxCalculator> {\n\t\treturn this.resources.create<ManualTaxCalculatorCreate, ManualTaxCalculator>({ ...resource, type: ManualTaxCalculators.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ManualTaxCalculatorUpdate, params?: QueryParamsRetrieve<ManualTaxCalculator>, options?: ResourcesConfig): Promise<ManualTaxCalculator> {\n\t\treturn this.resources.update<ManualTaxCalculatorUpdate, ManualTaxCalculator>({ ...resource, type: ManualTaxCalculators.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: ManualTaxCalculators.TYPE } : id, options)\n\t}\n\n\tasync markets(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _manualTaxCalculatorId = (manualTaxCalculatorId as ManualTaxCalculator).id || manualTaxCalculatorId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `manual_tax_calculators/${_manualTaxCalculatorId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _manualTaxCalculatorId = (manualTaxCalculatorId as ManualTaxCalculator).id || manualTaxCalculatorId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `manual_tax_calculators/${_manualTaxCalculatorId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _manualTaxCalculatorId = (manualTaxCalculatorId as ManualTaxCalculator).id || manualTaxCalculatorId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `manual_tax_calculators/${_manualTaxCalculatorId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync tax_rules(manualTaxCalculatorId: string | ManualTaxCalculator, params?: QueryParamsList<TaxRule>, options?: ResourcesConfig): Promise<ListResponse<TaxRule>> {\n\t\tconst _manualTaxCalculatorId = (manualTaxCalculatorId as ManualTaxCalculator).id || manualTaxCalculatorId as string\n\t\treturn this.resources.fetch<TaxRule>({ type: 'tax_rules' }, `manual_tax_calculators/${_manualTaxCalculatorId}/tax_rules`, params, options) as unknown as ListResponse<TaxRule>\n\t}\n\n\n\tisManualTaxCalculator(resource: any): resource is ManualTaxCalculator {\n\t\treturn resource.type && (resource.type === ManualTaxCalculators.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ManualTaxCalculatorRel {\n\t\treturn super.relationshipOneToOne<ManualTaxCalculatorRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ManualTaxCalculatorRel[] {\n\t\treturn super.relationshipOneToMany<ManualTaxCalculatorRel>(...ids)\n\t}\n\n\n\ttype(): ManualTaxCalculatorType {\n\t\treturn ManualTaxCalculators.TYPE\n\t}\n\n}\n\n\nexport default ManualTaxCalculators\n\nexport type { ManualTaxCalculator, ManualTaxCalculatorCreate, ManualTaxCalculatorUpdate, ManualTaxCalculatorType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Merchant, MerchantType } from './merchants'\nimport type { PriceList, PriceListType } from './price_lists'\nimport type { InventoryModel, InventoryModelType } from './inventory_models'\nimport type { SubscriptionModel, SubscriptionModelType } from './subscription_models'\nimport type { TaxCalculator, TaxCalculatorType } from './tax_calculators'\nimport type { CustomerGroup, CustomerGroupType } from './customer_groups'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype MarketType = 'markets'\ntype MarketRel = ResourceRel & { type: MarketType }\ntype MerchantRel = ResourceRel & { type: MerchantType }\ntype PriceListRel = ResourceRel & { type: PriceListType }\ntype InventoryModelRel = ResourceRel & { type: InventoryModelType }\ntype SubscriptionModelRel = ResourceRel & { type: SubscriptionModelType }\ntype TaxCalculatorRel = ResourceRel & { type: TaxCalculatorType }\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\n\n\nexport type MarketSort = Pick<Market, 'id' | 'name' | 'code' | 'disabled_at'> & ResourceSort\n// export type MarketFilter = Pick<Market, 'id' | 'name' | 'code' | 'disabled_at'> & ResourceFilter\n\n\ninterface Market extends Resource {\n\t\n\treadonly type: MarketType\n\n\tnumber?: number | null\n\tname: string\n\tcode?: string | null\n\tfacebook_pixel_id?: string | null\n\tcheckout_url?: string | null\n\texternal_prices_url?: string | null\n\texternal_order_validation_url?: string | null\n\tprivate?: boolean | null\n\tdisabled_at?: string | null\n\tshared_secret: string\n\n\tmerchant?: Merchant | null\n\tprice_list?: PriceList | null\n\tinventory_model?: InventoryModel | null\n\tsubscription_model?: SubscriptionModel | null\n\ttax_calculator?: TaxCalculator | null\n\tcustomer_group?: CustomerGroup | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface MarketCreate extends ResourceCreate {\n\t\n\tname: string\n\tcode?: string | null\n\tfacebook_pixel_id?: string | null\n\tcheckout_url?: string | null\n\texternal_prices_url?: string | null\n\texternal_order_validation_url?: string | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\n\tmerchant: MerchantRel\n\tprice_list: PriceListRel\n\tinventory_model: InventoryModelRel\n\tsubscription_model?: SubscriptionModelRel | null\n\ttax_calculator?: TaxCalculatorRel | null\n\tcustomer_group?: CustomerGroupRel | null\n\n}\n\n\ninterface MarketUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tcode?: string | null\n\tfacebook_pixel_id?: string | null\n\tcheckout_url?: string | null\n\texternal_prices_url?: string | null\n\texternal_order_validation_url?: string | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\n\tmerchant?: MerchantRel | null\n\tprice_list?: PriceListRel | null\n\tinventory_model?: InventoryModelRel | null\n\tsubscription_model?: SubscriptionModelRel | null\n\ttax_calculator?: TaxCalculatorRel | null\n\tcustomer_group?: CustomerGroupRel | null\n\n}\n\n\nclass Markets extends ApiResource<Market> {\n\n\tstatic readonly TYPE: MarketType = 'markets' as const\n\n\tasync create(resource: MarketCreate, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.create<MarketCreate, Market>({ ...resource, type: Markets.TYPE }, params, options)\n\t}\n\n\tasync update(resource: MarketUpdate, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.update<MarketUpdate, Market>({ ...resource, type: Markets.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Markets.TYPE } : id, options)\n\t}\n\n\tasync merchant(marketId: string | Market, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Merchant>({ type: 'merchants' }, `markets/${_marketId}/merchant`, params, options) as unknown as Merchant\n\t}\n\n\tasync price_list(marketId: string | Market, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<PriceList>({ type: 'price_lists' }, `markets/${_marketId}/price_list`, params, options) as unknown as PriceList\n\t}\n\n\tasync inventory_model(marketId: string | Market, params?: QueryParamsRetrieve<InventoryModel>, options?: ResourcesConfig): Promise<InventoryModel> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<InventoryModel>({ type: 'inventory_models' }, `markets/${_marketId}/inventory_model`, params, options) as unknown as InventoryModel\n\t}\n\n\tasync subscription_model(marketId: string | Market, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<SubscriptionModel>({ type: 'subscription_models' }, `markets/${_marketId}/subscription_model`, params, options) as unknown as SubscriptionModel\n\t}\n\n\tasync tax_calculator(marketId: string | Market, params?: QueryParamsRetrieve<TaxCalculator>, options?: ResourcesConfig): Promise<TaxCalculator> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<TaxCalculator>({ type: 'tax_calculators' }, `markets/${_marketId}/tax_calculator`, params, options) as unknown as TaxCalculator\n\t}\n\n\tasync customer_group(marketId: string | Market, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<CustomerGroup>({ type: 'customer_groups' }, `markets/${_marketId}/customer_group`, params, options) as unknown as CustomerGroup\n\t}\n\n\tasync attachments(marketId: string | Market, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `markets/${_marketId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(marketId: string | Market, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _marketId = (marketId as Market).id || marketId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `markets/${_marketId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | Market, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.update<MarketUpdate, Market>({ id: (typeof id === 'string')? id: id.id, type: Markets.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | Market, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\treturn this.resources.update<MarketUpdate, Market>({ id: (typeof id === 'string')? id: id.id, type: Markets.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisMarket(resource: any): resource is Market {\n\t\treturn resource.type && (resource.type === Markets.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): MarketRel {\n\t\treturn super.relationshipOneToOne<MarketRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): MarketRel[] {\n\t\treturn super.relationshipOneToMany<MarketRel>(...ids)\n\t}\n\n\n\ttype(): MarketType {\n\t\treturn Markets.TYPE\n\t}\n\n}\n\n\nexport default Markets\n\nexport type { Market, MarketCreate, MarketUpdate, MarketType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Address, AddressType } from './addresses'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype MerchantType = 'merchants'\ntype MerchantRel = ResourceRel & { type: MerchantType }\ntype AddressRel = ResourceRel & { type: AddressType }\n\n\nexport type MerchantSort = Pick<Merchant, 'id' | 'name'> & ResourceSort\n// export type MerchantFilter = Pick<Merchant, 'id' | 'name'> & ResourceFilter\n\n\ninterface Merchant extends Resource {\n\t\n\treadonly type: MerchantType\n\n\tname: string\n\n\taddress?: Address | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface MerchantCreate extends ResourceCreate {\n\t\n\tname: string\n\n\taddress: AddressRel\n\n}\n\n\ninterface MerchantUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\n\taddress?: AddressRel | null\n\n}\n\n\nclass Merchants extends ApiResource<Merchant> {\n\n\tstatic readonly TYPE: MerchantType = 'merchants' as const\n\n\tasync create(resource: MerchantCreate, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\treturn this.resources.create<MerchantCreate, Merchant>({ ...resource, type: Merchants.TYPE }, params, options)\n\t}\n\n\tasync update(resource: MerchantUpdate, params?: QueryParamsRetrieve<Merchant>, options?: ResourcesConfig): Promise<Merchant> {\n\t\treturn this.resources.update<MerchantUpdate, Merchant>({ ...resource, type: Merchants.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Merchants.TYPE } : id, options)\n\t}\n\n\tasync address(merchantId: string | Merchant, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _merchantId = (merchantId as Merchant).id || merchantId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `merchants/${_merchantId}/address`, params, options) as unknown as Address\n\t}\n\n\tasync attachments(merchantId: string | Merchant, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _merchantId = (merchantId as Merchant).id || merchantId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `merchants/${_merchantId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(merchantId: string | Merchant, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _merchantId = (merchantId as Merchant).id || merchantId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `merchants/${_merchantId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisMerchant(resource: any): resource is Merchant {\n\t\treturn resource.type && (resource.type === Merchants.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): MerchantRel {\n\t\treturn super.relationshipOneToOne<MerchantRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): MerchantRel[] {\n\t\treturn super.relationshipOneToMany<MerchantRel>(...ids)\n\t}\n\n\n\ttype(): MerchantType {\n\t\treturn Merchants.TYPE\n\t}\n\n}\n\n\nexport default Merchants\n\nexport type { Merchant, MerchantCreate, MerchantUpdate, MerchantType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions'\nimport type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { Version } from './versions'\n\n\ntype OrderAmountPromotionRuleType = 'order_amount_promotion_rules'\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\n\n\nexport type OrderAmountPromotionRuleSort = Pick<OrderAmountPromotionRule, 'id'> & ResourceSort\n// export type OrderAmountPromotionRuleFilter = Pick<OrderAmountPromotionRule, 'id'> & ResourceFilter\n\n\ninterface OrderAmountPromotionRule extends Resource {\n\t\n\treadonly type: OrderAmountPromotionRuleType\n\n\torder_amount_cents?: number | null\n\torder_amount_float?: number | null\n\tformatted_order_amount?: string | null\n\tuse_subtotal?: boolean | null\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface OrderAmountPromotionRuleCreate extends ResourceCreate {\n\t\n\torder_amount_cents?: number | null\n\tuse_subtotal?: boolean | null\n\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel\n\n}\n\n\ninterface OrderAmountPromotionRuleUpdate extends ResourceUpdate {\n\t\n\torder_amount_cents?: number | null\n\tuse_subtotal?: boolean | null\n\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | null\n\n}\n\n\nclass OrderAmountPromotionRules extends ApiResource<OrderAmountPromotionRule> {\n\n\tstatic readonly TYPE: OrderAmountPromotionRuleType = 'order_amount_promotion_rules' as const\n\n\tasync create(resource: OrderAmountPromotionRuleCreate, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\treturn this.resources.create<OrderAmountPromotionRuleCreate, OrderAmountPromotionRule>({ ...resource, type: OrderAmountPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: OrderAmountPromotionRuleUpdate, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\treturn this.resources.update<OrderAmountPromotionRuleUpdate, OrderAmountPromotionRule>({ ...resource, type: OrderAmountPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: OrderAmountPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(orderAmountPromotionRuleId: string | OrderAmountPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _orderAmountPromotionRuleId = (orderAmountPromotionRuleId as OrderAmountPromotionRule).id || orderAmountPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `order_amount_promotion_rules/${_orderAmountPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisOrderAmountPromotionRule(resource: any): resource is OrderAmountPromotionRule {\n\t\treturn resource.type && (resource.type === OrderAmountPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderAmountPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<OrderAmountPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderAmountPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<OrderAmountPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): OrderAmountPromotionRuleType {\n\t\treturn OrderAmountPromotionRules.TYPE\n\t}\n\n}\n\n\nexport default OrderAmountPromotionRules\n\nexport type { OrderAmountPromotionRule, OrderAmountPromotionRuleCreate, OrderAmountPromotionRuleUpdate, OrderAmountPromotionRuleType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { Event } from './events'\nimport type { OrderSubscription } from './order_subscriptions'\n\n\ntype OrderCopyType = 'order_copies'\ntype OrderCopyRel = ResourceRel & { type: OrderCopyType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type OrderCopySort = Pick<OrderCopy, 'id' | 'status' | 'started_at' | 'completed_at' | 'failed_at' | 'errors_count'> & ResourceSort\n// export type OrderCopyFilter = Pick<OrderCopy, 'id' | 'status' | 'started_at' | 'completed_at' | 'failed_at' | 'errors_count'> & ResourceFilter\n\n\ninterface OrderCopy extends Resource {\n\t\n\treadonly type: OrderCopyType\n\n\tstatus: 'pending' | 'in_progress' | 'failed' | 'completed'\n\tstarted_at?: string | null\n\tcompleted_at?: string | null\n\tfailed_at?: string | null\n\terrors_log?: Record<string, any> | null\n\terrors_count?: number | null\n\tplace_target_order?: boolean | null\n\treuse_wallet?: boolean | null\n\tcancel_source_order?: boolean | null\n\n\tsource_order?: Order | null\n\ttarget_order?: Order | null\n\tevents?: Event[] | null\n\torder_subscription?: OrderSubscription | null\n\n}\n\n\ninterface OrderCopyCreate extends ResourceCreate {\n\t\n\tplace_target_order?: boolean | null\n\treuse_wallet?: boolean | null\n\tcancel_source_order?: boolean | null\n\n\tsource_order: OrderRel\n\n}\n\n\ntype OrderCopyUpdate = ResourceUpdate\n\n\nclass OrderCopies extends ApiResource<OrderCopy> {\n\n\tstatic readonly TYPE: OrderCopyType = 'order_copies' as const\n\n\tasync create(resource: OrderCopyCreate, params?: QueryParamsRetrieve<OrderCopy>, options?: ResourcesConfig): Promise<OrderCopy> {\n\t\treturn this.resources.create<OrderCopyCreate, OrderCopy>({ ...resource, type: OrderCopies.TYPE }, params, options)\n\t}\n\n\tasync update(resource: OrderCopyUpdate, params?: QueryParamsRetrieve<OrderCopy>, options?: ResourcesConfig): Promise<OrderCopy> {\n\t\treturn this.resources.update<OrderCopyUpdate, OrderCopy>({ ...resource, type: OrderCopies.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: OrderCopies.TYPE } : id, options)\n\t}\n\n\tasync source_order(orderCopyId: string | OrderCopy, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _orderCopyId = (orderCopyId as OrderCopy).id || orderCopyId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `order_copies/${_orderCopyId}/source_order`, params, options) as unknown as Order\n\t}\n\n\tasync target_order(orderCopyId: string | OrderCopy, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _orderCopyId = (orderCopyId as OrderCopy).id || orderCopyId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `order_copies/${_orderCopyId}/target_order`, params, options) as unknown as Order\n\t}\n\n\tasync events(orderCopyId: string | OrderCopy, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _orderCopyId = (orderCopyId as OrderCopy).id || orderCopyId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `order_copies/${_orderCopyId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync order_subscription(orderCopyId: string | OrderCopy, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\tconst _orderCopyId = (orderCopyId as OrderCopy).id || orderCopyId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `order_copies/${_orderCopyId}/order_subscription`, params, options) as unknown as OrderSubscription\n\t}\n\n\n\tisOrderCopy(resource: any): resource is OrderCopy {\n\t\treturn resource.type && (resource.type === OrderCopies.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderCopyRel {\n\t\treturn super.relationshipOneToOne<OrderCopyRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderCopyRel[] {\n\t\treturn super.relationshipOneToMany<OrderCopyRel>(...ids)\n\t}\n\n\n\ttype(): OrderCopyType {\n\t\treturn OrderCopies.TYPE\n\t}\n\n}\n\n\nexport default OrderCopies\n\nexport type { OrderCopy, OrderCopyCreate, OrderCopyUpdate, OrderCopyType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order } from './orders'\nimport type { Event } from './events'\n\n\ntype OrderFactoryType = 'order_factories'\ntype OrderFactoryRel = ResourceRel & { type: OrderFactoryType }\n\n\nexport type OrderFactorySort = Pick<OrderFactory, 'id' | 'status' | 'started_at' | 'completed_at' | 'failed_at' | 'errors_count'> & ResourceSort\n// export type OrderFactoryFilter = Pick<OrderFactory, 'id' | 'status' | 'started_at' | 'completed_at' | 'failed_at' | 'errors_count'> & ResourceFilter\n\n\ninterface OrderFactory extends Resource {\n\t\n\treadonly type: OrderFactoryType\n\n\tstatus: 'pending' | 'in_progress' | 'failed' | 'completed'\n\tstarted_at?: string | null\n\tcompleted_at?: string | null\n\tfailed_at?: string | null\n\terrors_log?: Record<string, any> | null\n\terrors_count?: number | null\n\tplace_target_order?: boolean | null\n\treuse_wallet?: boolean | null\n\n\tsource_order?: Order | null\n\ttarget_order?: Order | null\n\tevents?: Event[] | null\n\n}\n\n\nclass OrderFactories extends ApiResource<OrderFactory> {\n\n\tstatic readonly TYPE: OrderFactoryType = 'order_factories' as const\n\n\tasync source_order(orderFactoryId: string | OrderFactory, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _orderFactoryId = (orderFactoryId as OrderFactory).id || orderFactoryId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `order_factories/${_orderFactoryId}/source_order`, params, options) as unknown as Order\n\t}\n\n\tasync target_order(orderFactoryId: string | OrderFactory, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _orderFactoryId = (orderFactoryId as OrderFactory).id || orderFactoryId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `order_factories/${_orderFactoryId}/target_order`, params, options) as unknown as Order\n\t}\n\n\tasync events(orderFactoryId: string | OrderFactory, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _orderFactoryId = (orderFactoryId as OrderFactory).id || orderFactoryId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `order_factories/${_orderFactoryId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\n\tisOrderFactory(resource: any): resource is OrderFactory {\n\t\treturn resource.type && (resource.type === OrderFactories.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderFactoryRel {\n\t\treturn super.relationshipOneToOne<OrderFactoryRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderFactoryRel[] {\n\t\treturn super.relationshipOneToMany<OrderFactoryRel>(...ids)\n\t}\n\n\n\ttype(): OrderFactoryType {\n\t\treturn OrderFactories.TYPE\n\t}\n\n}\n\n\nexport default OrderFactories\n\nexport type { OrderFactory, OrderFactoryType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\nimport type { OrderSubscription, OrderSubscriptionType } from './order_subscriptions'\nimport type { Adjustment, AdjustmentType } from './adjustments'\nimport type { Bundle, BundleType } from './bundles'\nimport type { Sku, SkuType } from './skus'\nimport type { LineItem } from './line_items'\n\n\ntype OrderSubscriptionItemType = 'order_subscription_items'\ntype OrderSubscriptionItemRel = ResourceRel & { type: OrderSubscriptionItemType }\ntype OrderSubscriptionRel = ResourceRel & { type: OrderSubscriptionType }\ntype AdjustmentRel = ResourceRel & { type: AdjustmentType }\ntype BundleRel = ResourceRel & { type: BundleType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type OrderSubscriptionItemSort = Pick<OrderSubscriptionItem, 'id' | 'quantity' | 'unit_amount_cents'> & ResourceSort\n// export type OrderSubscriptionItemFilter = Pick<OrderSubscriptionItem, 'id' | 'quantity' | 'unit_amount_cents'> & ResourceFilter\n\n\ninterface OrderSubscriptionItem extends Resource {\n\t\n\treadonly type: OrderSubscriptionItemType\n\n\tsku_code?: string | null\n\tbundle_code?: string | null\n\tquantity: number\n\tunit_amount_cents?: number | null\n\tunit_amount_float?: number | null\n\tformatted_unit_amount?: string | null\n\ttotal_amount_cents?: number | null\n\ttotal_amount_float: number\n\tformatted_total_amount?: string | null\n\n\torder_subscription?: OrderSubscription | null\n\titem?: Adjustment | Bundle | Sku | null\n\tsku?: Sku | null\n\tbundle?: Bundle | null\n\tadjustment?: Adjustment | null\n\tsource_line_item?: LineItem | null\n\n}\n\n\ninterface OrderSubscriptionItemCreate extends ResourceCreate {\n\t\n\tsku_code?: string | null\n\tbundle_code?: string | null\n\tquantity: number\n\tunit_amount_cents?: number | null\n\n\torder_subscription: OrderSubscriptionRel\n\titem: AdjustmentRel | BundleRel | SkuRel\n\tsku?: SkuRel | null\n\tbundle?: BundleRel | null\n\tadjustment?: AdjustmentRel | null\n\n}\n\n\ninterface OrderSubscriptionItemUpdate extends ResourceUpdate {\n\t\n\tsku_code?: string | null\n\tbundle_code?: string | null\n\tquantity?: number | null\n\tunit_amount_cents?: number | null\n\t\n}\n\n\nclass OrderSubscriptionItems extends ApiResource<OrderSubscriptionItem> {\n\n\tstatic readonly TYPE: OrderSubscriptionItemType = 'order_subscription_items' as const\n\n\tasync create(resource: OrderSubscriptionItemCreate, params?: QueryParamsRetrieve<OrderSubscriptionItem>, options?: ResourcesConfig): Promise<OrderSubscriptionItem> {\n\t\treturn this.resources.create<OrderSubscriptionItemCreate, OrderSubscriptionItem>({ ...resource, type: OrderSubscriptionItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: OrderSubscriptionItemUpdate, params?: QueryParamsRetrieve<OrderSubscriptionItem>, options?: ResourcesConfig): Promise<OrderSubscriptionItem> {\n\t\treturn this.resources.update<OrderSubscriptionItemUpdate, OrderSubscriptionItem>({ ...resource, type: OrderSubscriptionItems.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: OrderSubscriptionItems.TYPE } : id, options)\n\t}\n\n\tasync order_subscription(orderSubscriptionItemId: string | OrderSubscriptionItem, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\tconst _orderSubscriptionItemId = (orderSubscriptionItemId as OrderSubscriptionItem).id || orderSubscriptionItemId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `order_subscription_items/${_orderSubscriptionItemId}/order_subscription`, params, options) as unknown as OrderSubscription\n\t}\n\n\tasync source_line_item(orderSubscriptionItemId: string | OrderSubscriptionItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\tconst _orderSubscriptionItemId = (orderSubscriptionItemId as OrderSubscriptionItem).id || orderSubscriptionItemId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `order_subscription_items/${_orderSubscriptionItemId}/source_line_item`, params, options) as unknown as LineItem\n\t}\n\n\n\tisOrderSubscriptionItem(resource: any): resource is OrderSubscriptionItem {\n\t\treturn resource.type && (resource.type === OrderSubscriptionItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderSubscriptionItemRel {\n\t\treturn super.relationshipOneToOne<OrderSubscriptionItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderSubscriptionItemRel[] {\n\t\treturn super.relationshipOneToMany<OrderSubscriptionItemRel>(...ids)\n\t}\n\n\n\ttype(): OrderSubscriptionItemType {\n\t\treturn OrderSubscriptionItems.TYPE\n\t}\n\n}\n\n\nexport default OrderSubscriptionItems\n\nexport type { OrderSubscriptionItem, OrderSubscriptionItemCreate, OrderSubscriptionItemUpdate, OrderSubscriptionItemType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { SubscriptionModel } from './subscription_models'\nimport type { Order, OrderType } from './orders'\nimport type { Customer } from './customers'\nimport type { CustomerPaymentSource, CustomerPaymentSourceType } from './customer_payment_sources'\nimport type { OrderSubscriptionItem } from './order_subscription_items'\nimport type { OrderFactory } from './order_factories'\nimport type { RecurringOrderCopy } from './recurring_order_copies'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype OrderSubscriptionType = 'order_subscriptions'\ntype OrderSubscriptionRel = ResourceRel & { type: OrderSubscriptionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype CustomerPaymentSourceRel = ResourceRel & { type: CustomerPaymentSourceType }\n\n\nexport type OrderSubscriptionSort = Pick<OrderSubscription, 'id' | 'number' | 'status' | 'frequency' | 'starts_at' | 'expires_at' | 'last_run_at' | 'next_run_at' | 'occurrencies' | 'errors_count' | 'succeeded_on_last_run'> & ResourceSort\n// export type OrderSubscriptionFilter = Pick<OrderSubscription, 'id' | 'number' | 'status' | 'frequency' | 'customer_email' | 'starts_at' | 'expires_at' | 'last_run_at' | 'next_run_at' | 'occurrencies' | 'errors_count' | 'succeeded_on_last_run'> & ResourceFilter\n\n\ninterface OrderSubscription extends Resource {\n\t\n\treadonly type: OrderSubscriptionType\n\n\tnumber?: string | null\n\tstatus: 'draft' | 'inactive' | 'active' | 'cancelled'\n\tfrequency: string\n\tactivate_by_source_order?: boolean | null\n\tplace_target_order?: boolean | null\n\tcustomer_email?: string | null\n\tstarts_at?: string | null\n\texpires_at?: string | null\n\tlast_run_at?: string | null\n\tnext_run_at?: string | null\n\toccurrencies?: number | null\n\terrors_count?: number | null\n\tsucceeded_on_last_run?: boolean | null\n\n\tmarket?: Market | null\n\tsubscription_model?: SubscriptionModel | null\n\tsource_order?: Order | null\n\tcustomer?: Customer | null\n\tcustomer_payment_source?: CustomerPaymentSource | null\n\torder_subscription_items?: OrderSubscriptionItem[] | null\n\torder_factories?: OrderFactory[] | null\n\trecurring_order_copies?: RecurringOrderCopy[] | null\n\torders?: Order[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface OrderSubscriptionCreate extends ResourceCreate {\n\t\n\tfrequency: string\n\tactivate_by_source_order?: boolean | null\n\tplace_target_order?: boolean | null\n\tstarts_at?: string | null\n\texpires_at?: string | null\n\n\tmarket?: MarketRel | null\n\tsource_order: OrderRel\n\n}\n\n\ninterface OrderSubscriptionUpdate extends ResourceUpdate {\n\t\n\tfrequency?: string | null\n\tactivate_by_source_order?: boolean | null\n\tplace_target_order?: boolean | null\n\texpires_at?: string | null\n\tnext_run_at?: string | null\n\t_activate?: boolean | null\n\t_deactivate?: boolean | null\n\t_cancel?: boolean | null\n\n\tcustomer_payment_source?: CustomerPaymentSourceRel | null\n\n}\n\n\nclass OrderSubscriptions extends ApiResource<OrderSubscription> {\n\n\tstatic readonly TYPE: OrderSubscriptionType = 'order_subscriptions' as const\n\n\tasync create(resource: OrderSubscriptionCreate, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.create<OrderSubscriptionCreate, OrderSubscription>({ ...resource, type: OrderSubscriptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: OrderSubscriptionUpdate, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ ...resource, type: OrderSubscriptions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: OrderSubscriptions.TYPE } : id, options)\n\t}\n\n\tasync market(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `order_subscriptions/${_orderSubscriptionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync subscription_model(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<SubscriptionModel>({ type: 'subscription_models' }, `order_subscriptions/${_orderSubscriptionId}/subscription_model`, params, options) as unknown as SubscriptionModel\n\t}\n\n\tasync source_order(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `order_subscriptions/${_orderSubscriptionId}/source_order`, params, options) as unknown as Order\n\t}\n\n\tasync customer(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `order_subscriptions/${_orderSubscriptionId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync customer_payment_source(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsRetrieve<CustomerPaymentSource>, options?: ResourcesConfig): Promise<CustomerPaymentSource> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<CustomerPaymentSource>({ type: 'customer_payment_sources' }, `order_subscriptions/${_orderSubscriptionId}/customer_payment_source`, params, options) as unknown as CustomerPaymentSource\n\t}\n\n\tasync order_subscription_items(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<OrderSubscriptionItem>, options?: ResourcesConfig): Promise<ListResponse<OrderSubscriptionItem>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<OrderSubscriptionItem>({ type: 'order_subscription_items' }, `order_subscriptions/${_orderSubscriptionId}/order_subscription_items`, params, options) as unknown as ListResponse<OrderSubscriptionItem>\n\t}\n\n\tasync order_factories(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<OrderFactory>, options?: ResourcesConfig): Promise<ListResponse<OrderFactory>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<OrderFactory>({ type: 'order_factories' }, `order_subscriptions/${_orderSubscriptionId}/order_factories`, params, options) as unknown as ListResponse<OrderFactory>\n\t}\n\n\tasync recurring_order_copies(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<RecurringOrderCopy>, options?: ResourcesConfig): Promise<ListResponse<RecurringOrderCopy>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<RecurringOrderCopy>({ type: 'recurring_order_copies' }, `order_subscriptions/${_orderSubscriptionId}/recurring_order_copies`, params, options) as unknown as ListResponse<RecurringOrderCopy>\n\t}\n\n\tasync orders(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `order_subscriptions/${_orderSubscriptionId}/orders`, params, options) as unknown as ListResponse<Order>\n\t}\n\n\tasync events(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `order_subscriptions/${_orderSubscriptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(orderSubscriptionId: string | OrderSubscription, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _orderSubscriptionId = (orderSubscriptionId as OrderSubscription).id || orderSubscriptionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `order_subscriptions/${_orderSubscriptionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _activate(id: string | OrderSubscription, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ id: (typeof id === 'string')? id: id.id, type: OrderSubscriptions.TYPE, _activate: true }, params, options)\n\t}\n\n\tasync _deactivate(id: string | OrderSubscription, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ id: (typeof id === 'string')? id: id.id, type: OrderSubscriptions.TYPE, _deactivate: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | OrderSubscription, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\treturn this.resources.update<OrderSubscriptionUpdate, OrderSubscription>({ id: (typeof id === 'string')? id: id.id, type: OrderSubscriptions.TYPE, _cancel: true }, params, options)\n\t}\n\n\n\tisOrderSubscription(resource: any): resource is OrderSubscription {\n\t\treturn resource.type && (resource.type === OrderSubscriptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderSubscriptionRel {\n\t\treturn super.relationshipOneToOne<OrderSubscriptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderSubscriptionRel[] {\n\t\treturn super.relationshipOneToMany<OrderSubscriptionRel>(...ids)\n\t}\n\n\n\ttype(): OrderSubscriptionType {\n\t\treturn OrderSubscriptions.TYPE\n\t}\n\n}\n\n\nexport default OrderSubscriptions\n\nexport type { OrderSubscription, OrderSubscriptionCreate, OrderSubscriptionUpdate, OrderSubscriptionType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype OrderValidationRuleType = 'order_validation_rules'\ntype OrderValidationRuleRel = ResourceRel & { type: OrderValidationRuleType }\n\n\nexport type OrderValidationRuleSort = Pick<OrderValidationRule, 'id'> & ResourceSort\n// export type OrderValidationRuleFilter = Pick<OrderValidationRule, 'id'> & ResourceFilter\n\n\ninterface OrderValidationRule extends Resource {\n\t\n\treadonly type: OrderValidationRuleType\n\n\n\tmarket?: Market | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass OrderValidationRules extends ApiResource<OrderValidationRule> {\n\n\tstatic readonly TYPE: OrderValidationRuleType = 'order_validation_rules' as const\n\n\tasync market(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _orderValidationRuleId = (orderValidationRuleId as OrderValidationRule).id || orderValidationRuleId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `order_validation_rules/${_orderValidationRuleId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync attachments(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _orderValidationRuleId = (orderValidationRuleId as OrderValidationRule).id || orderValidationRuleId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `order_validation_rules/${_orderValidationRuleId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(orderValidationRuleId: string | OrderValidationRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _orderValidationRuleId = (orderValidationRuleId as OrderValidationRule).id || orderValidationRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `order_validation_rules/${_orderValidationRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisOrderValidationRule(resource: any): resource is OrderValidationRule {\n\t\treturn resource.type && (resource.type === OrderValidationRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderValidationRuleRel {\n\t\treturn super.relationshipOneToOne<OrderValidationRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderValidationRuleRel[] {\n\t\treturn super.relationshipOneToMany<OrderValidationRuleRel>(...ids)\n\t}\n\n\n\ttype(): OrderValidationRuleType {\n\t\treturn OrderValidationRules.TYPE\n\t}\n\n}\n\n\nexport default OrderValidationRules\n\nexport type { OrderValidationRule, OrderValidationRuleType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { Customer, CustomerType } from './customers'\nimport type { Address, AddressType } from './addresses'\nimport type { PaymentMethod, PaymentMethodType } from './payment_methods'\nimport type { CustomerPaymentSource } from './customer_payment_sources'\nimport type { Sku } from './skus'\nimport type { Bundle } from './bundles'\nimport type { AdyenPayment, AdyenPaymentType } from './adyen_payments'\nimport type { AxervePayment, AxervePaymentType } from './axerve_payments'\nimport type { BraintreePayment, BraintreePaymentType } from './braintree_payments'\nimport type { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments'\nimport type { ExternalPayment, ExternalPaymentType } from './external_payments'\nimport type { KlarnaPayment, KlarnaPaymentType } from './klarna_payments'\nimport type { PaypalPayment, PaypalPaymentType } from './paypal_payments'\nimport type { SatispayPayment, SatispayPaymentType } from './satispay_payments'\nimport type { StripePayment, StripePaymentType } from './stripe_payments'\nimport type { WireTransfer, WireTransferType } from './wire_transfers'\nimport type { LineItem } from './line_items'\nimport type { LineItemOption } from './line_item_options'\nimport type { StockReservation } from './stock_reservations'\nimport type { StockLineItem } from './stock_line_items'\nimport type { StockTransfer } from './stock_transfers'\nimport type { Shipment } from './shipments'\nimport type { PaymentOption } from './payment_options'\nimport type { Authorization } from './authorizations'\nimport type { Capture } from './captures'\nimport type { Void } from './voids'\nimport type { Refund } from './refunds'\nimport type { Return } from './returns'\nimport type { OrderSubscription } from './order_subscriptions'\nimport type { OrderFactory } from './order_factories'\nimport type { OrderCopy } from './order_copies'\nimport type { RecurringOrderCopy } from './recurring_order_copies'\nimport type { Attachment } from './attachments'\nimport type { ResourceError } from './resource_errors'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype OrderType = 'orders'\ntype OrderRel = ResourceRel & { type: OrderType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype AddressRel = ResourceRel & { type: AddressType }\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\ntype AdyenPaymentRel = ResourceRel & { type: AdyenPaymentType }\ntype AxervePaymentRel = ResourceRel & { type: AxervePaymentType }\ntype BraintreePaymentRel = ResourceRel & { type: BraintreePaymentType }\ntype CheckoutComPaymentRel = ResourceRel & { type: CheckoutComPaymentType }\ntype ExternalPaymentRel = ResourceRel & { type: ExternalPaymentType }\ntype KlarnaPaymentRel = ResourceRel & { type: KlarnaPaymentType }\ntype PaypalPaymentRel = ResourceRel & { type: PaypalPaymentType }\ntype SatispayPaymentRel = ResourceRel & { type: SatispayPaymentType }\ntype StripePaymentRel = ResourceRel & { type: StripePaymentType }\ntype WireTransferRel = ResourceRel & { type: WireTransferType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type OrderSort = Pick<Order, 'id' | 'number' | 'place_async' | 'status' | 'payment_status' | 'fulfillment_status' | 'guest' | 'language_code' | 'currency_code' | 'tax_included' | 'tax_rate' | 'country_code' | 'coupon_code' | 'gift_card_code' | 'subtotal_amount_cents' | 'shipping_amount_cents' | 'payment_method_amount_cents' | 'discount_amount_cents' | 'adjustment_amount_cents' | 'gift_card_amount_cents' | 'total_tax_amount_cents' | 'subtotal_tax_amount_cents' | 'total_amount_cents' | 'fees_amount_cents' | 'duty_amount_cents' | 'placed_at' | 'approved_at' | 'cancelled_at' | 'payment_updated_at' | 'fulfillment_updated_at' | 'refreshed_at' | 'archived_at' | 'expires_at' | 'subscription_created_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceSort\n// export type OrderFilter = Pick<Order, 'id' | 'number' | 'place_async' | 'status' | 'payment_status' | 'fulfillment_status' | 'guest' | 'customer_email' | 'language_code' | 'currency_code' | 'tax_included' | 'tax_rate' | 'country_code' | 'coupon_code' | 'gift_card_code' | 'subtotal_amount_cents' | 'shipping_amount_cents' | 'payment_method_amount_cents' | 'discount_amount_cents' | 'adjustment_amount_cents' | 'gift_card_amount_cents' | 'total_tax_amount_cents' | 'subtotal_tax_amount_cents' | 'total_amount_cents' | 'fees_amount_cents' | 'duty_amount_cents' | 'token' | 'placed_at' | 'approved_at' | 'cancelled_at' | 'payment_updated_at' | 'fulfillment_updated_at' | 'refreshed_at' | 'archived_at' | 'expires_at' | 'subscription_created_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceFilter\n\n\ninterface Order extends Resource {\n\t\n\treadonly type: OrderType\n\n\tnumber?: string | null\n\tautorefresh?: boolean | null\n\tplace_async?: boolean | null\n\tstatus: 'draft' | 'pending' | 'placing' | 'placed' | 'editing' | 'approved' | 'cancelled'\n\tpayment_status: 'unpaid' | 'authorized' | 'partially_authorized' | 'paid' | 'partially_paid' | 'voided' | 'partially_voided' | 'refunded' | 'partially_refunded' | 'free'\n\tfulfillment_status: 'unfulfilled' | 'in_progress' | 'fulfilled' | 'not_required'\n\tguest?: boolean | null\n\teditable?: boolean | null\n\tcustomer_email?: string | null\n\tlanguage_code?: string | null\n\tcurrency_code?: string | null\n\ttax_included?: boolean | null\n\ttax_rate?: number | null\n\tfreight_taxable?: boolean | null\n\tpayment_method_taxable?: boolean | null\n\tadjustment_taxable?: boolean | null\n\tgift_card_taxable?: boolean | null\n\trequires_billing_info?: boolean | null\n\tcountry_code?: string | null\n\tshipping_country_code_lock?: string | null\n\tcoupon_code?: string | null\n\tgift_card_code?: string | null\n\tsubtotal_amount_cents?: number | null\n\tsubtotal_amount_float?: number | null\n\tformatted_subtotal_amount?: string | null\n\tshipping_amount_cents?: number | null\n\tshipping_amount_float?: number | null\n\tformatted_shipping_amount?: string | null\n\tpayment_method_amount_cents?: number | null\n\tpayment_method_amount_float?: number | null\n\tformatted_payment_method_amount?: string | null\n\tdiscount_amount_cents?: number | null\n\tdiscount_amount_float?: number | null\n\tformatted_discount_amount?: string | null\n\tadjustment_amount_cents?: number | null\n\tadjustment_amount_float?: number | null\n\tformatted_adjustment_amount?: string | null\n\tgift_card_amount_cents?: number | null\n\tgift_card_amount_float?: number | null\n\tformatted_gift_card_amount?: string | null\n\ttotal_tax_amount_cents?: number | null\n\ttotal_tax_amount_float?: number | null\n\tformatted_total_tax_amount?: string | null\n\tsubtotal_tax_amount_cents?: number | null\n\tsubtotal_tax_amount_float?: number | null\n\tformatted_subtotal_tax_amount?: string | null\n\tshipping_tax_amount_cents?: number | null\n\tshipping_tax_amount_float?: number | null\n\tformatted_shipping_tax_amount?: string | null\n\tpayment_method_tax_amount_cents?: number | null\n\tpayment_method_tax_amount_float?: number | null\n\tformatted_payment_method_tax_amount?: string | null\n\tadjustment_tax_amount_cents?: number | null\n\tadjustment_tax_amount_float?: number | null\n\tformatted_adjustment_tax_amount?: string | null\n\ttotal_amount_cents?: number | null\n\ttotal_amount_float?: number | null\n\tformatted_total_amount?: string | null\n\ttotal_taxable_amount_cents?: number | null\n\ttotal_taxable_amount_float?: number | null\n\tformatted_total_taxable_amount?: string | null\n\tsubtotal_taxable_amount_cents?: number | null\n\tsubtotal_taxable_amount_float?: number | null\n\tformatted_subtotal_taxable_amount?: string | null\n\tshipping_taxable_amount_cents?: number | null\n\tshipping_taxable_amount_float?: number | null\n\tformatted_shipping_taxable_amount?: string | null\n\tpayment_method_taxable_amount_cents?: number | null\n\tpayment_method_taxable_amount_float?: number | null\n\tformatted_payment_method_taxable_amount?: string | null\n\tadjustment_taxable_amount_cents?: number | null\n\tadjustment_taxable_amount_float?: number | null\n\tformatted_adjustment_taxable_amount?: string | null\n\ttotal_amount_with_taxes_cents?: number | null\n\ttotal_amount_with_taxes_float?: number | null\n\tformatted_total_amount_with_taxes?: string | null\n\tfees_amount_cents?: number | null\n\tfees_amount_float?: number | null\n\tformatted_fees_amount?: string | null\n\tduty_amount_cents?: number | null\n\tduty_amount_float?: number | null\n\tformatted_duty_amount?: string | null\n\tplace_total_amount_cents?: number | null\n\tplace_total_amount_float?: number | null\n\tformatted_place_total_amount?: string | null\n\tskus_count?: number | null\n\tline_item_options_count?: number | null\n\tshipments_count?: number | null\n\ttax_calculations_count?: number | null\n\tvalidations_count?: number | null\n\terrors_count?: number | null\n\tpayment_source_details?: Record<string, any> | null\n\ttoken?: string | null\n\tcart_url?: string | null\n\treturn_url?: string | null\n\tterms_url?: string | null\n\tprivacy_url?: string | null\n\tcheckout_url?: string | null\n\tplaced_at?: string | null\n\tapproved_at?: string | null\n\tcancelled_at?: string | null\n\tpayment_updated_at?: string | null\n\tfulfillment_updated_at?: string | null\n\trefreshed_at?: string | null\n\tarchived_at?: string | null\n\texpires_at?: string | null\n\tsubscription_created_at?: string | null\n\tcircuit_state?: string | null\n\tcircuit_failure_count?: number | null\n\n\tmarket?: Market | null\n\tcustomer?: Customer | null\n\tshipping_address?: Address | null\n\tbilling_address?: Address | null\n\tavailable_payment_methods?: PaymentMethod[] | null\n\tavailable_customer_payment_sources?: CustomerPaymentSource[] | null\n\tavailable_free_skus?: Sku[] | null\n\tavailable_free_bundles?: Bundle[] | null\n\tpayment_method?: PaymentMethod | null\n\tpayment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null\n\tline_items?: LineItem[] | null\n\tline_item_options?: LineItemOption[] | null\n\tstock_reservations?: StockReservation[] | null\n\tstock_line_items?: StockLineItem[] | null\n\tstock_transfers?: StockTransfer[] | null\n\tshipments?: Shipment[] | null\n\tpayment_options?: PaymentOption[] | null\n\ttransactions?: Array<Authorization | Capture | Void | Refund> | null\n\tauthorizations?: Authorization[] | null\n\tcaptures?: Capture[] | null\n\tvoids?: Void[] | null\n\trefunds?: Refund[] | null\n\treturns?: Return[] | null\n\torder_subscription?: OrderSubscription | null\n\torder_subscriptions?: OrderSubscription[] | null\n\torder_factories?: OrderFactory[] | null\n\torder_copies?: OrderCopy[] | null\n\trecurring_order_copies?: RecurringOrderCopy[] | null\n\tattachments?: Attachment[] | null\n\tresource_errors?: ResourceError[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface OrderCreate extends ResourceCreate {\n\t\n\tnumber?: string | null\n\tautorefresh?: boolean | null\n\tplace_async?: boolean | null\n\tguest?: boolean | null\n\tcustomer_email?: string | null\n\tcustomer_password?: string | null\n\tlanguage_code?: string | null\n\tfreight_taxable?: boolean | null\n\tpayment_method_taxable?: boolean | null\n\tadjustment_taxable?: boolean | null\n\tgift_card_taxable?: boolean | null\n\tshipping_country_code_lock?: string | null\n\tcoupon_code?: string | null\n\tgift_card_code?: string | null\n\tcart_url?: string | null\n\treturn_url?: string | null\n\tterms_url?: string | null\n\tprivacy_url?: string | null\n\n\tmarket?: MarketRel | null\n\tcustomer?: CustomerRel | null\n\tshipping_address?: AddressRel | null\n\tbilling_address?: AddressRel | null\n\tpayment_method?: PaymentMethodRel | null\n\tpayment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface OrderUpdate extends ResourceUpdate {\n\t\n\tnumber?: string | null\n\tautorefresh?: boolean | null\n\tplace_async?: boolean | null\n\tguest?: boolean | null\n\tcustomer_email?: string | null\n\tcustomer_password?: string | null\n\tlanguage_code?: string | null\n\tfreight_taxable?: boolean | null\n\tpayment_method_taxable?: boolean | null\n\tadjustment_taxable?: boolean | null\n\tgift_card_taxable?: boolean | null\n\tshipping_country_code_lock?: string | null\n\tcoupon_code?: string | null\n\tgift_card_code?: string | null\n\tcart_url?: string | null\n\treturn_url?: string | null\n\tterms_url?: string | null\n\tprivacy_url?: string | null\n\t_archive?: boolean | null\n\t_unarchive?: boolean | null\n\t_pending?: boolean | null\n\t_place?: boolean | null\n\t_cancel?: boolean | null\n\t_approve?: boolean | null\n\t_approve_and_capture?: boolean | null\n\t_authorize?: boolean | null\n\t_authorization_amount_cents?: number | null\n\t_capture?: boolean | null\n\t_refund?: boolean | null\n\t_update_taxes?: boolean | null\n\t_nullify_payment_source?: boolean | null\n\t_billing_address_clone_id?: string | null\n\t_shipping_address_clone_id?: string | null\n\t_customer_payment_source_id?: string | null\n\t_shipping_address_same_as_billing?: boolean | null\n\t_billing_address_same_as_shipping?: boolean | null\n\t_commit_invoice?: boolean | null\n\t_refund_invoice?: boolean | null\n\t_save_payment_source_to_customer_wallet?: boolean | null\n\t_save_shipping_address_to_customer_address_book?: boolean | null\n\t_save_billing_address_to_customer_address_book?: boolean | null\n\t_refresh?: boolean | null\n\t_validate?: boolean | null\n\t_create_subscriptions?: boolean | null\n\t_start_editing?: boolean | null\n\t_stop_editing?: boolean | null\n\t_reset_circuit?: boolean | null\n\n\tmarket?: MarketRel | null\n\tcustomer?: CustomerRel | null\n\tshipping_address?: AddressRel | null\n\tbilling_address?: AddressRel | null\n\tpayment_method?: PaymentMethodRel | null\n\tpayment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Orders extends ApiResource<Order> {\n\n\tstatic readonly TYPE: OrderType = 'orders' as const\n\n\tasync create(resource: OrderCreate, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.create<OrderCreate, Order>({ ...resource, type: Orders.TYPE }, params, options)\n\t}\n\n\tasync update(resource: OrderUpdate, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ ...resource, type: Orders.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Orders.TYPE } : id, options)\n\t}\n\n\tasync market(orderId: string | Order, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `orders/${_orderId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync customer(orderId: string | Order, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `orders/${_orderId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync shipping_address(orderId: string | Order, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `orders/${_orderId}/shipping_address`, params, options) as unknown as Address\n\t}\n\n\tasync billing_address(orderId: string | Order, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `orders/${_orderId}/billing_address`, params, options) as unknown as Address\n\t}\n\n\tasync available_payment_methods(orderId: string | Order, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `orders/${_orderId}/available_payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync available_customer_payment_sources(orderId: string | Order, params?: QueryParamsList<CustomerPaymentSource>, options?: ResourcesConfig): Promise<ListResponse<CustomerPaymentSource>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<CustomerPaymentSource>({ type: 'customer_payment_sources' }, `orders/${_orderId}/available_customer_payment_sources`, params, options) as unknown as ListResponse<CustomerPaymentSource>\n\t}\n\n\tasync available_free_skus(orderId: string | Order, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `orders/${_orderId}/available_free_skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync available_free_bundles(orderId: string | Order, params?: QueryParamsList<Bundle>, options?: ResourcesConfig): Promise<ListResponse<Bundle>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<Bundle>({ type: 'bundles' }, `orders/${_orderId}/available_free_bundles`, params, options) as unknown as ListResponse<Bundle>\n\t}\n\n\tasync payment_method(orderId: string | Order, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `orders/${_orderId}/payment_method`, params, options) as unknown as PaymentMethod\n\t}\n\n\tasync line_items(orderId: string | Order, params?: QueryParamsList<LineItem>, options?: ResourcesConfig): Promise<ListResponse<LineItem>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `orders/${_orderId}/line_items`, params, options) as unknown as ListResponse<LineItem>\n\t}\n\n\tasync line_item_options(orderId: string | Order, params?: QueryParamsList<LineItemOption>, options?: ResourcesConfig): Promise<ListResponse<LineItemOption>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<LineItemOption>({ type: 'line_item_options' }, `orders/${_orderId}/line_item_options`, params, options) as unknown as ListResponse<LineItemOption>\n\t}\n\n\tasync stock_reservations(orderId: string | Order, params?: QueryParamsList<StockReservation>, options?: ResourcesConfig): Promise<ListResponse<StockReservation>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `orders/${_orderId}/stock_reservations`, params, options) as unknown as ListResponse<StockReservation>\n\t}\n\n\tasync stock_line_items(orderId: string | Order, params?: QueryParamsList<StockLineItem>, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<StockLineItem>({ type: 'stock_line_items' }, `orders/${_orderId}/stock_line_items`, params, options) as unknown as ListResponse<StockLineItem>\n\t}\n\n\tasync stock_transfers(orderId: string | Order, params?: QueryParamsList<StockTransfer>, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<StockTransfer>({ type: 'stock_transfers' }, `orders/${_orderId}/stock_transfers`, params, options) as unknown as ListResponse<StockTransfer>\n\t}\n\n\tasync shipments(orderId: string | Order, params?: QueryParamsList<Shipment>, options?: ResourcesConfig): Promise<ListResponse<Shipment>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<Shipment>({ type: 'shipments' }, `orders/${_orderId}/shipments`, params, options) as unknown as ListResponse<Shipment>\n\t}\n\n\tasync payment_options(orderId: string | Order, params?: QueryParamsList<PaymentOption>, options?: ResourcesConfig): Promise<ListResponse<PaymentOption>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<PaymentOption>({ type: 'payment_options' }, `orders/${_orderId}/payment_options`, params, options) as unknown as ListResponse<PaymentOption>\n\t}\n\n\tasync authorizations(orderId: string | Order, params?: QueryParamsList<Authorization>, options?: ResourcesConfig): Promise<ListResponse<Authorization>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<Authorization>({ type: 'authorizations' }, `orders/${_orderId}/authorizations`, params, options) as unknown as ListResponse<Authorization>\n\t}\n\n\tasync captures(orderId: string | Order, params?: QueryParamsList<Capture>, options?: ResourcesConfig): Promise<ListResponse<Capture>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<Capture>({ type: 'captures' }, `orders/${_orderId}/captures`, params, options) as unknown as ListResponse<Capture>\n\t}\n\n\tasync voids(orderId: string | Order, params?: QueryParamsList<Void>, options?: ResourcesConfig): Promise<ListResponse<Void>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<Void>({ type: 'voids' }, `orders/${_orderId}/voids`, params, options) as unknown as ListResponse<Void>\n\t}\n\n\tasync refunds(orderId: string | Order, params?: QueryParamsList<Refund>, options?: ResourcesConfig): Promise<ListResponse<Refund>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<Refund>({ type: 'refunds' }, `orders/${_orderId}/refunds`, params, options) as unknown as ListResponse<Refund>\n\t}\n\n\tasync returns(orderId: string | Order, params?: QueryParamsList<Return>, options?: ResourcesConfig): Promise<ListResponse<Return>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<Return>({ type: 'returns' }, `orders/${_orderId}/returns`, params, options) as unknown as ListResponse<Return>\n\t}\n\n\tasync order_subscription(orderId: string | Order, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `orders/${_orderId}/order_subscription`, params, options) as unknown as OrderSubscription\n\t}\n\n\tasync order_subscriptions(orderId: string | Order, params?: QueryParamsList<OrderSubscription>, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `orders/${_orderId}/order_subscriptions`, params, options) as unknown as ListResponse<OrderSubscription>\n\t}\n\n\tasync order_factories(orderId: string | Order, params?: QueryParamsList<OrderFactory>, options?: ResourcesConfig): Promise<ListResponse<OrderFactory>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<OrderFactory>({ type: 'order_factories' }, `orders/${_orderId}/order_factories`, params, options) as unknown as ListResponse<OrderFactory>\n\t}\n\n\tasync order_copies(orderId: string | Order, params?: QueryParamsList<OrderCopy>, options?: ResourcesConfig): Promise<ListResponse<OrderCopy>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<OrderCopy>({ type: 'order_copies' }, `orders/${_orderId}/order_copies`, params, options) as unknown as ListResponse<OrderCopy>\n\t}\n\n\tasync recurring_order_copies(orderId: string | Order, params?: QueryParamsList<RecurringOrderCopy>, options?: ResourcesConfig): Promise<ListResponse<RecurringOrderCopy>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<RecurringOrderCopy>({ type: 'recurring_order_copies' }, `orders/${_orderId}/recurring_order_copies`, params, options) as unknown as ListResponse<RecurringOrderCopy>\n\t}\n\n\tasync attachments(orderId: string | Order, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `orders/${_orderId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync resource_errors(orderId: string | Order, params?: QueryParamsList<ResourceError>, options?: ResourcesConfig): Promise<ListResponse<ResourceError>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<ResourceError>({ type: 'resource_errors' }, `orders/${_orderId}/resource_errors`, params, options) as unknown as ListResponse<ResourceError>\n\t}\n\n\tasync events(orderId: string | Order, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `orders/${_orderId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(orderId: string | Order, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `orders/${_orderId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(orderId: string | Order, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _orderId = (orderId as Order).id || orderId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `orders/${_orderId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _archive(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _archive: true }, params, options)\n\t}\n\n\tasync _unarchive(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _unarchive: true }, params, options)\n\t}\n\n\tasync _pending(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _pending: true }, params, options)\n\t}\n\n\tasync _place(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _place: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _cancel: true }, params, options)\n\t}\n\n\tasync _approve(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _approve: true }, params, options)\n\t}\n\n\tasync _approve_and_capture(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _approve_and_capture: true }, params, options)\n\t}\n\n\tasync _authorize(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _authorize: true }, params, options)\n\t}\n\n\tasync _authorization_amount_cents(id: string | Order, triggerValue: number, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _authorization_amount_cents: triggerValue }, params, options)\n\t}\n\n\tasync _capture(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _capture: true }, params, options)\n\t}\n\n\tasync _refund(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _refund: true }, params, options)\n\t}\n\n\tasync _update_taxes(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _update_taxes: true }, params, options)\n\t}\n\n\tasync _nullify_payment_source(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _nullify_payment_source: true }, params, options)\n\t}\n\n\tasync _billing_address_clone_id(id: string | Order, triggerValue: string, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _billing_address_clone_id: triggerValue }, params, options)\n\t}\n\n\tasync _shipping_address_clone_id(id: string | Order, triggerValue: string, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _shipping_address_clone_id: triggerValue }, params, options)\n\t}\n\n\tasync _customer_payment_source_id(id: string | Order, triggerValue: string, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _customer_payment_source_id: triggerValue }, params, options)\n\t}\n\n\tasync _shipping_address_same_as_billing(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _shipping_address_same_as_billing: true }, params, options)\n\t}\n\n\tasync _billing_address_same_as_shipping(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _billing_address_same_as_shipping: true }, params, options)\n\t}\n\n\tasync _commit_invoice(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _commit_invoice: true }, params, options)\n\t}\n\n\tasync _refund_invoice(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _refund_invoice: true }, params, options)\n\t}\n\n\tasync _save_payment_source_to_customer_wallet(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _save_payment_source_to_customer_wallet: true }, params, options)\n\t}\n\n\tasync _save_shipping_address_to_customer_address_book(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _save_shipping_address_to_customer_address_book: true }, params, options)\n\t}\n\n\tasync _save_billing_address_to_customer_address_book(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _save_billing_address_to_customer_address_book: true }, params, options)\n\t}\n\n\tasync _refresh(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _refresh: true }, params, options)\n\t}\n\n\tasync _validate(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _validate: true }, params, options)\n\t}\n\n\tasync _create_subscriptions(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _create_subscriptions: true }, params, options)\n\t}\n\n\tasync _start_editing(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _start_editing: true }, params, options)\n\t}\n\n\tasync _stop_editing(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _stop_editing: true }, params, options)\n\t}\n\n\tasync _reset_circuit(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\treturn this.resources.update<OrderUpdate, Order>({ id: (typeof id === 'string')? id: id.id, type: Orders.TYPE, _reset_circuit: true }, params, options)\n\t}\n\n\n\tisOrder(resource: any): resource is Order {\n\t\treturn resource.type && (resource.type === Orders.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrderRel {\n\t\treturn super.relationshipOneToOne<OrderRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrderRel[] {\n\t\treturn super.relationshipOneToMany<OrderRel>(...ids)\n\t}\n\n\n\ttype(): OrderType {\n\t\treturn Orders.TYPE\n\t}\n\n}\n\n\nexport default Orders\n\nexport type { Order, OrderCreate, OrderUpdate, OrderType }\n","import { ApiSingleton } from '../resource'\nimport type { Resource, ResourceId, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\n\n\n\n\ntype OrganizationType = 'organization'\ntype OrganizationRel = ResourceRel & { type: OrganizationType }\n\n\nexport type OrganizationSort = Pick<Organization, 'id'> & ResourceSort\n// export type OrganizationFilter = Pick<Organization, 'id'> & ResourceFilter\n\n\ninterface Organization extends Resource {\n\t\n\treadonly type: OrganizationType\n\n\tname?: string | null\n\tslug?: string | null\n\tdomain?: string | null\n\tsupport_phone?: string | null\n\tsupport_email?: string | null\n\tlogo_url?: string | null\n\tfavicon_url?: string | null\n\tprimary_color?: string | null\n\tgtm_id?: string | null\n\tgtm_id_test?: string | null\n\tmax_concurrent_promotions?: number | null\n\tmax_concurrent_imports?: number | null\n\tmax_concurrent_exports?: number | null\n\tmax_concurrent_cleanups?: number | null\n\torder_number_editable_test?: boolean | null\n\torder_number_editable_live?: boolean | null\n\tconfig?: Record<string, any> | null\n\t\n}\n\n\nclass Organizations extends ApiSingleton<Organization> {\n\n\tstatic readonly TYPE: OrganizationType = 'organization' as const\n\n\t\n\n\n\tisOrganization(resource: any): resource is Organization {\n\t\treturn resource.type && (resource.type === Organizations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): OrganizationRel {\n\t\treturn super.relationshipOneToOne<OrganizationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): OrganizationRel[] {\n\t\treturn super.relationshipOneToMany<OrganizationRel>(...ids)\n\t}\n\n\n\ttype(): OrganizationType {\n\t\treturn Organizations.TYPE\n\t}\n\n}\n\n\nexport default Organizations\n\nexport type { Organization, OrganizationType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { Parcel } from './parcels'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype PackageType = 'packages'\ntype PackageRel = ResourceRel & { type: PackageType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\n\n\nexport type PackageSort = Pick<Package, 'id' | 'name' | 'code' | 'length' | 'width' | 'height' | 'unit_of_length'> & ResourceSort\n// export type PackageFilter = Pick<Package, 'id' | 'name' | 'code' | 'length' | 'width' | 'height' | 'unit_of_length'> & ResourceFilter\n\n\ninterface Package extends Resource {\n\t\n\treadonly type: PackageType\n\n\tname: string\n\tcode?: string | null\n\tlength: number\n\twidth: number\n\theight: number\n\tunit_of_length: string\n\n\tstock_location?: StockLocation | null\n\tparcels?: Parcel[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface PackageCreate extends ResourceCreate {\n\t\n\tname: string\n\tcode?: string | null\n\tlength: number\n\twidth: number\n\theight: number\n\tunit_of_length: string\n\n\tstock_location: StockLocationRel\n\n}\n\n\ninterface PackageUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tcode?: string | null\n\tlength?: number | null\n\twidth?: number | null\n\theight?: number | null\n\tunit_of_length?: string | null\n\n\tstock_location?: StockLocationRel | null\n\n}\n\n\nclass Packages extends ApiResource<Package> {\n\n\tstatic readonly TYPE: PackageType = 'packages' as const\n\n\tasync create(resource: PackageCreate, params?: QueryParamsRetrieve<Package>, options?: ResourcesConfig): Promise<Package> {\n\t\treturn this.resources.create<PackageCreate, Package>({ ...resource, type: Packages.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PackageUpdate, params?: QueryParamsRetrieve<Package>, options?: ResourcesConfig): Promise<Package> {\n\t\treturn this.resources.update<PackageUpdate, Package>({ ...resource, type: Packages.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Packages.TYPE } : id, options)\n\t}\n\n\tasync stock_location(packageId: string | Package, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _packageId = (packageId as Package).id || packageId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `packages/${_packageId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync parcels(packageId: string | Package, params?: QueryParamsList<Parcel>, options?: ResourcesConfig): Promise<ListResponse<Parcel>> {\n\t\tconst _packageId = (packageId as Package).id || packageId as string\n\t\treturn this.resources.fetch<Parcel>({ type: 'parcels' }, `packages/${_packageId}/parcels`, params, options) as unknown as ListResponse<Parcel>\n\t}\n\n\tasync attachments(packageId: string | Package, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _packageId = (packageId as Package).id || packageId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `packages/${_packageId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(packageId: string | Package, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _packageId = (packageId as Package).id || packageId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `packages/${_packageId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisPackage(resource: any): resource is Package {\n\t\treturn resource.type && (resource.type === Packages.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PackageRel {\n\t\treturn super.relationshipOneToOne<PackageRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PackageRel[] {\n\t\treturn super.relationshipOneToMany<PackageRel>(...ids)\n\t}\n\n\n\ttype(): PackageType {\n\t\treturn Packages.TYPE\n\t}\n\n}\n\n\nexport default Packages\n\nexport type { Package, PackageCreate, PackageUpdate, PackageType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Parcel, ParcelType } from './parcels'\nimport type { StockLineItem, StockLineItemType } from './stock_line_items'\nimport type { Version } from './versions'\n\n\ntype ParcelLineItemType = 'parcel_line_items'\ntype ParcelLineItemRel = ResourceRel & { type: ParcelLineItemType }\ntype ParcelRel = ResourceRel & { type: ParcelType }\ntype StockLineItemRel = ResourceRel & { type: StockLineItemType }\n\n\nexport type ParcelLineItemSort = Pick<ParcelLineItem, 'id' | 'quantity'> & ResourceSort\n// export type ParcelLineItemFilter = Pick<ParcelLineItem, 'id' | 'quantity'> & ResourceFilter\n\n\ninterface ParcelLineItem extends Resource {\n\t\n\treadonly type: ParcelLineItemType\n\n\tsku_code?: string | null\n\tbundle_code?: string | null\n\tquantity: number\n\tname: string\n\timage_url?: string | null\n\n\tparcel?: Parcel | null\n\tstock_line_item?: StockLineItem | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ParcelLineItemCreate extends ResourceCreate {\n\t\n\tquantity: number\n\n\tparcel: ParcelRel\n\tstock_line_item: StockLineItemRel\n\n}\n\n\ntype ParcelLineItemUpdate = ResourceUpdate\n\n\nclass ParcelLineItems extends ApiResource<ParcelLineItem> {\n\n\tstatic readonly TYPE: ParcelLineItemType = 'parcel_line_items' as const\n\n\tasync create(resource: ParcelLineItemCreate, params?: QueryParamsRetrieve<ParcelLineItem>, options?: ResourcesConfig): Promise<ParcelLineItem> {\n\t\treturn this.resources.create<ParcelLineItemCreate, ParcelLineItem>({ ...resource, type: ParcelLineItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ParcelLineItemUpdate, params?: QueryParamsRetrieve<ParcelLineItem>, options?: ResourcesConfig): Promise<ParcelLineItem> {\n\t\treturn this.resources.update<ParcelLineItemUpdate, ParcelLineItem>({ ...resource, type: ParcelLineItems.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: ParcelLineItems.TYPE } : id, options)\n\t}\n\n\tasync parcel(parcelLineItemId: string | ParcelLineItem, params?: QueryParamsRetrieve<Parcel>, options?: ResourcesConfig): Promise<Parcel> {\n\t\tconst _parcelLineItemId = (parcelLineItemId as ParcelLineItem).id || parcelLineItemId as string\n\t\treturn this.resources.fetch<Parcel>({ type: 'parcels' }, `parcel_line_items/${_parcelLineItemId}/parcel`, params, options) as unknown as Parcel\n\t}\n\n\tasync stock_line_item(parcelLineItemId: string | ParcelLineItem, params?: QueryParamsRetrieve<StockLineItem>, options?: ResourcesConfig): Promise<StockLineItem> {\n\t\tconst _parcelLineItemId = (parcelLineItemId as ParcelLineItem).id || parcelLineItemId as string\n\t\treturn this.resources.fetch<StockLineItem>({ type: 'stock_line_items' }, `parcel_line_items/${_parcelLineItemId}/stock_line_item`, params, options) as unknown as StockLineItem\n\t}\n\n\tasync versions(parcelLineItemId: string | ParcelLineItem, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _parcelLineItemId = (parcelLineItemId as ParcelLineItem).id || parcelLineItemId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `parcel_line_items/${_parcelLineItemId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisParcelLineItem(resource: any): resource is ParcelLineItem {\n\t\treturn resource.type && (resource.type === ParcelLineItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ParcelLineItemRel {\n\t\treturn super.relationshipOneToOne<ParcelLineItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ParcelLineItemRel[] {\n\t\treturn super.relationshipOneToMany<ParcelLineItemRel>(...ids)\n\t}\n\n\n\ttype(): ParcelLineItemType {\n\t\treturn ParcelLineItems.TYPE\n\t}\n\n}\n\n\nexport default ParcelLineItems\n\nexport type { ParcelLineItem, ParcelLineItemCreate, ParcelLineItemUpdate, ParcelLineItemType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Shipment, ShipmentType } from './shipments'\nimport type { Package, PackageType } from './packages'\nimport type { ParcelLineItem } from './parcel_line_items'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype ParcelType = 'parcels'\ntype ParcelRel = ResourceRel & { type: ParcelType }\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype PackageRel = ResourceRel & { type: PackageType }\n\n\nexport type ParcelSort = Pick<Parcel, 'id' | 'weight' | 'unit_of_weight' | 'tracking_status' | 'tracking_status_updated_at' | 'carrier_weight_oz'> & ResourceSort\n// export type ParcelFilter = Pick<Parcel, 'id' | 'weight' | 'unit_of_weight' | 'contents_explanation' | 'shipping_label_url' | 'shipping_label_file_type' | 'shipping_label_size' | 'shipping_label_resolution' | 'tracking_number' | 'tracking_status' | 'tracking_status_detail' | 'tracking_status_updated_at' | 'carrier_weight_oz' | 'incoterm' | 'delivery_confirmation'> & ResourceFilter\n\n\ninterface Parcel extends Resource {\n\t\n\treadonly type: ParcelType\n\n\tnumber?: string | null\n\tweight: number\n\tunit_of_weight: string\n\teel_pfc?: string | null\n\tcontents_type?: string | null\n\tcontents_explanation?: string | null\n\tcustoms_certify?: boolean | null\n\tcustoms_signer?: string | null\n\tnon_delivery_option?: string | null\n\trestriction_type?: string | null\n\trestriction_comments?: string | null\n\tcustoms_info_required?: boolean | null\n\tshipping_label_url?: string | null\n\tshipping_label_file_type?: string | null\n\tshipping_label_size?: string | null\n\tshipping_label_resolution?: string | null\n\ttracking_number?: string | null\n\ttracking_status?: string | null\n\ttracking_status_detail?: string | null\n\ttracking_status_updated_at?: string | null\n\ttracking_details?: Record<string, any> | null\n\tcarrier_weight_oz?: string | null\n\tsigned_by?: string | null\n\tincoterm?: string | null\n\tdelivery_confirmation?: string | null\n\n\tshipment?: Shipment | null\n\tpackage?: Package | null\n\tparcel_line_items?: ParcelLineItem[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ParcelCreate extends ResourceCreate {\n\t\n\tweight: number\n\tunit_of_weight: string\n\teel_pfc?: string | null\n\tcontents_type?: string | null\n\tcontents_explanation?: string | null\n\tcustoms_certify?: boolean | null\n\tcustoms_signer?: string | null\n\tnon_delivery_option?: string | null\n\trestriction_type?: string | null\n\trestriction_comments?: string | null\n\tcustoms_info_required?: boolean | null\n\tshipping_label_url?: string | null\n\tshipping_label_file_type?: string | null\n\tshipping_label_size?: string | null\n\tshipping_label_resolution?: string | null\n\ttracking_number?: string | null\n\ttracking_status?: string | null\n\ttracking_status_detail?: string | null\n\ttracking_status_updated_at?: string | null\n\ttracking_details?: Record<string, any> | null\n\tcarrier_weight_oz?: string | null\n\tsigned_by?: string | null\n\tincoterm?: string | null\n\tdelivery_confirmation?: string | null\n\n\tshipment: ShipmentRel\n\tpackage: PackageRel\n\n}\n\n\ninterface ParcelUpdate extends ResourceUpdate {\n\t\n\tweight?: number | null\n\tunit_of_weight?: string | null\n\teel_pfc?: string | null\n\tcontents_type?: string | null\n\tcontents_explanation?: string | null\n\tcustoms_certify?: boolean | null\n\tcustoms_signer?: string | null\n\tnon_delivery_option?: string | null\n\trestriction_type?: string | null\n\trestriction_comments?: string | null\n\tcustoms_info_required?: boolean | null\n\tshipping_label_url?: string | null\n\tshipping_label_file_type?: string | null\n\tshipping_label_size?: string | null\n\tshipping_label_resolution?: string | null\n\ttracking_number?: string | null\n\ttracking_status?: string | null\n\ttracking_status_detail?: string | null\n\ttracking_status_updated_at?: string | null\n\ttracking_details?: Record<string, any> | null\n\tcarrier_weight_oz?: string | null\n\tsigned_by?: string | null\n\tincoterm?: string | null\n\tdelivery_confirmation?: string | null\n\n\tshipment?: ShipmentRel | null\n\tpackage?: PackageRel | null\n\n}\n\n\nclass Parcels extends ApiResource<Parcel> {\n\n\tstatic readonly TYPE: ParcelType = 'parcels' as const\n\n\tasync create(resource: ParcelCreate, params?: QueryParamsRetrieve<Parcel>, options?: ResourcesConfig): Promise<Parcel> {\n\t\treturn this.resources.create<ParcelCreate, Parcel>({ ...resource, type: Parcels.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ParcelUpdate, params?: QueryParamsRetrieve<Parcel>, options?: ResourcesConfig): Promise<Parcel> {\n\t\treturn this.resources.update<ParcelUpdate, Parcel>({ ...resource, type: Parcels.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Parcels.TYPE } : id, options)\n\t}\n\n\tasync shipment(parcelId: string | Parcel, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\tconst _parcelId = (parcelId as Parcel).id || parcelId as string\n\t\treturn this.resources.fetch<Shipment>({ type: 'shipments' }, `parcels/${_parcelId}/shipment`, params, options) as unknown as Shipment\n\t}\n\n\tasync package(parcelId: string | Parcel, params?: QueryParamsRetrieve<Package>, options?: ResourcesConfig): Promise<Package> {\n\t\tconst _parcelId = (parcelId as Parcel).id || parcelId as string\n\t\treturn this.resources.fetch<Package>({ type: 'packages' }, `parcels/${_parcelId}/package`, params, options) as unknown as Package\n\t}\n\n\tasync parcel_line_items(parcelId: string | Parcel, params?: QueryParamsList<ParcelLineItem>, options?: ResourcesConfig): Promise<ListResponse<ParcelLineItem>> {\n\t\tconst _parcelId = (parcelId as Parcel).id || parcelId as string\n\t\treturn this.resources.fetch<ParcelLineItem>({ type: 'parcel_line_items' }, `parcels/${_parcelId}/parcel_line_items`, params, options) as unknown as ListResponse<ParcelLineItem>\n\t}\n\n\tasync attachments(parcelId: string | Parcel, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _parcelId = (parcelId as Parcel).id || parcelId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `parcels/${_parcelId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(parcelId: string | Parcel, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _parcelId = (parcelId as Parcel).id || parcelId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `parcels/${_parcelId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(parcelId: string | Parcel, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _parcelId = (parcelId as Parcel).id || parcelId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `parcels/${_parcelId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisParcel(resource: any): resource is Parcel {\n\t\treturn resource.type && (resource.type === Parcels.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ParcelRel {\n\t\treturn super.relationshipOneToOne<ParcelRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ParcelRel[] {\n\t\treturn super.relationshipOneToMany<ParcelRel>(...ids)\n\t}\n\n\n\ttype(): ParcelType {\n\t\treturn Parcels.TYPE\n\t}\n\n}\n\n\nexport default Parcels\n\nexport type { Parcel, ParcelCreate, ParcelUpdate, ParcelType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsList } from '../query'\n\nimport type { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\n\n\ntype PaymentGatewayType = 'payment_gateways'\ntype PaymentGatewayRel = ResourceRel & { type: PaymentGatewayType }\n\n\nexport type PaymentGatewaySort = Pick<PaymentGateway, 'id' | 'name'> & ResourceSort\n// export type PaymentGatewayFilter = Pick<PaymentGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface PaymentGateway extends Resource {\n\t\n\treadonly type: PaymentGatewayType\n\n\tname: string\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass PaymentGateways extends ApiResource<PaymentGateway> {\n\n\tstatic readonly TYPE: PaymentGatewayType = 'payment_gateways' as const\n\n\tasync payment_methods(paymentGatewayId: string | PaymentGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _paymentGatewayId = (paymentGatewayId as PaymentGateway).id || paymentGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `payment_gateways/${_paymentGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(paymentGatewayId: string | PaymentGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _paymentGatewayId = (paymentGatewayId as PaymentGateway).id || paymentGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `payment_gateways/${_paymentGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisPaymentGateway(resource: any): resource is PaymentGateway {\n\t\treturn resource.type && (resource.type === PaymentGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PaymentGatewayRel {\n\t\treturn super.relationshipOneToOne<PaymentGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PaymentGatewayRel[] {\n\t\treturn super.relationshipOneToMany<PaymentGatewayRel>(...ids)\n\t}\n\n\n\ttype(): PaymentGatewayType {\n\t\treturn PaymentGateways.TYPE\n\t}\n\n}\n\n\nexport default PaymentGateways\n\nexport type { PaymentGateway, PaymentGatewayType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { PaymentGateway, PaymentGatewayType } from './payment_gateways'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype PaymentMethodType = 'payment_methods'\ntype PaymentMethodRel = ResourceRel & { type: PaymentMethodType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype PaymentGatewayRel = ResourceRel & { type: PaymentGatewayType }\n\n\nexport type PaymentMethodSort = Pick<PaymentMethod, 'id' | 'payment_source_type' | 'currency_code' | 'price_amount_cents' | 'disabled_at'> & ResourceSort\n// export type PaymentMethodFilter = Pick<PaymentMethod, 'id' | 'payment_source_type' | 'currency_code' | 'price_amount_cents' | 'disabled_at'> & ResourceFilter\n\n\ninterface PaymentMethod extends Resource {\n\t\n\treadonly type: PaymentMethodType\n\n\tname?: string | null\n\tpayment_source_type: 'adyen_payments' | 'axerve_payments' | 'braintree_payments' | 'checkout_com_payments' | 'credit_cards' | 'external_payments' | 'klarna_payments' | 'paypal_payments' | 'satispay_payments' | 'stripe_payments' | 'wire_transfers'\n\tcurrency_code?: string | null\n\tmoto?: boolean | null\n\trequire_capture?: boolean | null\n\tauto_place?: boolean | null\n\tauto_capture?: boolean | null\n\tprice_amount_cents: number\n\tprice_amount_float?: number | null\n\tformatted_price_amount?: string | null\n\tauto_capture_max_amount_cents?: number | null\n\tauto_capture_max_amount_float?: number | null\n\tformatted_auto_capture_max_amount?: string | null\n\tdisabled_at?: string | null\n\n\tmarket?: Market | null\n\tpayment_gateway?: PaymentGateway | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface PaymentMethodCreate extends ResourceCreate {\n\t\n\tpayment_source_type: 'adyen_payments' | 'axerve_payments' | 'braintree_payments' | 'checkout_com_payments' | 'credit_cards' | 'external_payments' | 'klarna_payments' | 'paypal_payments' | 'satispay_payments' | 'stripe_payments' | 'wire_transfers'\n\tcurrency_code?: string | null\n\tmoto?: boolean | null\n\trequire_capture?: boolean | null\n\tauto_place?: boolean | null\n\tauto_capture?: boolean | null\n\tprice_amount_cents: number\n\tauto_capture_max_amount_cents?: number | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\n\tmarket?: MarketRel | null\n\tpayment_gateway: PaymentGatewayRel\n\n}\n\n\ninterface PaymentMethodUpdate extends ResourceUpdate {\n\t\n\tpayment_source_type?: 'adyen_payments' | 'axerve_payments' | 'braintree_payments' | 'checkout_com_payments' | 'credit_cards' | 'external_payments' | 'klarna_payments' | 'paypal_payments' | 'satispay_payments' | 'stripe_payments' | 'wire_transfers' | null\n\tcurrency_code?: string | null\n\tmoto?: boolean | null\n\trequire_capture?: boolean | null\n\tauto_place?: boolean | null\n\tauto_capture?: boolean | null\n\tprice_amount_cents?: number | null\n\tauto_capture_max_amount_cents?: number | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\n\tmarket?: MarketRel | null\n\tpayment_gateway?: PaymentGatewayRel | null\n\n}\n\n\nclass PaymentMethods extends ApiResource<PaymentMethod> {\n\n\tstatic readonly TYPE: PaymentMethodType = 'payment_methods' as const\n\n\tasync create(resource: PaymentMethodCreate, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\treturn this.resources.create<PaymentMethodCreate, PaymentMethod>({ ...resource, type: PaymentMethods.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PaymentMethodUpdate, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\treturn this.resources.update<PaymentMethodUpdate, PaymentMethod>({ ...resource, type: PaymentMethods.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: PaymentMethods.TYPE } : id, options)\n\t}\n\n\tasync market(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _paymentMethodId = (paymentMethodId as PaymentMethod).id || paymentMethodId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `payment_methods/${_paymentMethodId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync payment_gateway(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _paymentMethodId = (paymentMethodId as PaymentMethod).id || paymentMethodId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `payment_methods/${_paymentMethodId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync attachments(paymentMethodId: string | PaymentMethod, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _paymentMethodId = (paymentMethodId as PaymentMethod).id || paymentMethodId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `payment_methods/${_paymentMethodId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(paymentMethodId: string | PaymentMethod, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _paymentMethodId = (paymentMethodId as PaymentMethod).id || paymentMethodId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `payment_methods/${_paymentMethodId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | PaymentMethod, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\treturn this.resources.update<PaymentMethodUpdate, PaymentMethod>({ id: (typeof id === 'string')? id: id.id, type: PaymentMethods.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | PaymentMethod, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod> {\n\t\treturn this.resources.update<PaymentMethodUpdate, PaymentMethod>({ id: (typeof id === 'string')? id: id.id, type: PaymentMethods.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisPaymentMethod(resource: any): resource is PaymentMethod {\n\t\treturn resource.type && (resource.type === PaymentMethods.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PaymentMethodRel {\n\t\treturn super.relationshipOneToOne<PaymentMethodRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PaymentMethodRel[] {\n\t\treturn super.relationshipOneToMany<PaymentMethodRel>(...ids)\n\t}\n\n\n\ttype(): PaymentMethodType {\n\t\treturn PaymentMethods.TYPE\n\t}\n\n}\n\n\nexport default PaymentMethods\n\nexport type { PaymentMethod, PaymentMethodCreate, PaymentMethodUpdate, PaymentMethodType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { Attachment } from './attachments'\n\n\ntype PaymentOptionType = 'payment_options'\ntype PaymentOptionRel = ResourceRel & { type: PaymentOptionType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type PaymentOptionSort = Pick<PaymentOption, 'id' | 'name' | 'payment_source_type'> & ResourceSort\n// export type PaymentOptionFilter = Pick<PaymentOption, 'id' | 'name' | 'payment_source_type' | 'data'> & ResourceFilter\n\n\ninterface PaymentOption extends Resource {\n\t\n\treadonly type: PaymentOptionType\n\n\tname?: string | null\n\tpayment_source_type: 'adyen_payments' | 'axerve_payments' | 'braintree_payments' | 'checkout_com_payments' | 'credit_cards' | 'external_payments' | 'klarna_payments' | 'paypal_payments' | 'satispay_payments' | 'stripe_payments' | 'wire_transfers'\n\tdata: Record<string, any>\n\n\torder?: Order | null\n\tattachments?: Attachment[] | null\n\n}\n\n\ninterface PaymentOptionCreate extends ResourceCreate {\n\t\n\tname?: string | null\n\tpayment_source_type: 'adyen_payments' | 'axerve_payments' | 'braintree_payments' | 'checkout_com_payments' | 'credit_cards' | 'external_payments' | 'klarna_payments' | 'paypal_payments' | 'satispay_payments' | 'stripe_payments' | 'wire_transfers'\n\tdata: Record<string, any>\n\n\torder: OrderRel\n\n}\n\n\ninterface PaymentOptionUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tdata?: Record<string, any> | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass PaymentOptions extends ApiResource<PaymentOption> {\n\n\tstatic readonly TYPE: PaymentOptionType = 'payment_options' as const\n\n\tasync create(resource: PaymentOptionCreate, params?: QueryParamsRetrieve<PaymentOption>, options?: ResourcesConfig): Promise<PaymentOption> {\n\t\treturn this.resources.create<PaymentOptionCreate, PaymentOption>({ ...resource, type: PaymentOptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PaymentOptionUpdate, params?: QueryParamsRetrieve<PaymentOption>, options?: ResourcesConfig): Promise<PaymentOption> {\n\t\treturn this.resources.update<PaymentOptionUpdate, PaymentOption>({ ...resource, type: PaymentOptions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: PaymentOptions.TYPE } : id, options)\n\t}\n\n\tasync order(paymentOptionId: string | PaymentOption, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _paymentOptionId = (paymentOptionId as PaymentOption).id || paymentOptionId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `payment_options/${_paymentOptionId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(paymentOptionId: string | PaymentOption, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _paymentOptionId = (paymentOptionId as PaymentOption).id || paymentOptionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `payment_options/${_paymentOptionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisPaymentOption(resource: any): resource is PaymentOption {\n\t\treturn resource.type && (resource.type === PaymentOptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PaymentOptionRel {\n\t\treturn super.relationshipOneToOne<PaymentOptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PaymentOptionRel[] {\n\t\treturn super.relationshipOneToMany<PaymentOptionRel>(...ids)\n\t}\n\n\n\ttype(): PaymentOptionType {\n\t\treturn PaymentOptions.TYPE\n\t}\n\n}\n\n\nexport default PaymentOptions\n\nexport type { PaymentOption, PaymentOptionCreate, PaymentOptionUpdate, PaymentOptionType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { PaypalPayment } from './paypal_payments'\n\n\ntype PaypalGatewayType = 'paypal_gateways'\ntype PaypalGatewayRel = ResourceRel & { type: PaypalGatewayType }\n\n\nexport type PaypalGatewaySort = Pick<PaypalGateway, 'id' | 'name'> & ResourceSort\n// export type PaypalGatewayFilter = Pick<PaypalGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface PaypalGateway extends Resource {\n\t\n\treadonly type: PaypalGatewayType\n\n\tname: string\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tpaypal_payments?: PaypalPayment[] | null\n\n}\n\n\ninterface PaypalGatewayCreate extends ResourceCreate {\n\t\n\tname: string\n\tclient_id: string\n\tclient_secret: string\n\t\n}\n\n\ninterface PaypalGatewayUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tclient_id?: string | null\n\tclient_secret?: string | null\n\t\n}\n\n\nclass PaypalGateways extends ApiResource<PaypalGateway> {\n\n\tstatic readonly TYPE: PaypalGatewayType = 'paypal_gateways' as const\n\n\tasync create(resource: PaypalGatewayCreate, params?: QueryParamsRetrieve<PaypalGateway>, options?: ResourcesConfig): Promise<PaypalGateway> {\n\t\treturn this.resources.create<PaypalGatewayCreate, PaypalGateway>({ ...resource, type: PaypalGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PaypalGatewayUpdate, params?: QueryParamsRetrieve<PaypalGateway>, options?: ResourcesConfig): Promise<PaypalGateway> {\n\t\treturn this.resources.update<PaypalGatewayUpdate, PaypalGateway>({ ...resource, type: PaypalGateways.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: PaypalGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(paypalGatewayId: string | PaypalGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _paypalGatewayId = (paypalGatewayId as PaypalGateway).id || paypalGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `paypal_gateways/${_paypalGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(paypalGatewayId: string | PaypalGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _paypalGatewayId = (paypalGatewayId as PaypalGateway).id || paypalGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `paypal_gateways/${_paypalGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync paypal_payments(paypalGatewayId: string | PaypalGateway, params?: QueryParamsList<PaypalPayment>, options?: ResourcesConfig): Promise<ListResponse<PaypalPayment>> {\n\t\tconst _paypalGatewayId = (paypalGatewayId as PaypalGateway).id || paypalGatewayId as string\n\t\treturn this.resources.fetch<PaypalPayment>({ type: 'paypal_payments' }, `paypal_gateways/${_paypalGatewayId}/paypal_payments`, params, options) as unknown as ListResponse<PaypalPayment>\n\t}\n\n\n\tisPaypalGateway(resource: any): resource is PaypalGateway {\n\t\treturn resource.type && (resource.type === PaypalGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PaypalGatewayRel {\n\t\treturn super.relationshipOneToOne<PaypalGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PaypalGatewayRel[] {\n\t\treturn super.relationshipOneToMany<PaypalGatewayRel>(...ids)\n\t}\n\n\n\ttype(): PaypalGatewayType {\n\t\treturn PaypalGateways.TYPE\n\t}\n\n}\n\n\nexport default PaypalGateways\n\nexport type { PaypalGateway, PaypalGatewayCreate, PaypalGatewayUpdate, PaypalGatewayType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype PaypalPaymentType = 'paypal_payments'\ntype PaypalPaymentRel = ResourceRel & { type: PaypalPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type PaypalPaymentSort = Pick<PaypalPayment, 'id'> & ResourceSort\n// export type PaypalPaymentFilter = Pick<PaypalPayment, 'id'> & ResourceFilter\n\n\ninterface PaypalPayment extends Resource {\n\t\n\treadonly type: PaypalPaymentType\n\n\treturn_url: string\n\tcancel_url: string\n\tnote_to_payer?: string | null\n\tpaypal_payer_id?: string | null\n\tname?: string | null\n\tpaypal_id?: string | null\n\tstatus: 'created' | 'approved'\n\tapproval_url?: string | null\n\tmismatched_amounts?: boolean | null\n\tintent_amount_cents: number\n\tintent_amount_float?: number | null\n\tformatted_intent_amount?: string | null\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface PaypalPaymentCreate extends ResourceCreate {\n\t\n\treturn_url: string\n\tcancel_url: string\n\tnote_to_payer?: string | null\n\n\torder: OrderRel\n\n}\n\n\ninterface PaypalPaymentUpdate extends ResourceUpdate {\n\t\n\tpaypal_payer_id?: string | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass PaypalPayments extends ApiResource<PaypalPayment> {\n\n\tstatic readonly TYPE: PaypalPaymentType = 'paypal_payments' as const\n\n\tasync create(resource: PaypalPaymentCreate, params?: QueryParamsRetrieve<PaypalPayment>, options?: ResourcesConfig): Promise<PaypalPayment> {\n\t\treturn this.resources.create<PaypalPaymentCreate, PaypalPayment>({ ...resource, type: PaypalPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PaypalPaymentUpdate, params?: QueryParamsRetrieve<PaypalPayment>, options?: ResourcesConfig): Promise<PaypalPayment> {\n\t\treturn this.resources.update<PaypalPaymentUpdate, PaypalPayment>({ ...resource, type: PaypalPayments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: PaypalPayments.TYPE } : id, options)\n\t}\n\n\tasync order(paypalPaymentId: string | PaypalPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _paypalPaymentId = (paypalPaymentId as PaypalPayment).id || paypalPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `paypal_payments/${_paypalPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(paypalPaymentId: string | PaypalPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _paypalPaymentId = (paypalPaymentId as PaypalPayment).id || paypalPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `paypal_payments/${_paypalPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(paypalPaymentId: string | PaypalPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _paypalPaymentId = (paypalPaymentId as PaypalPayment).id || paypalPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `paypal_payments/${_paypalPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisPaypalPayment(resource: any): resource is PaypalPayment {\n\t\treturn resource.type && (resource.type === PaypalPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PaypalPaymentRel {\n\t\treturn super.relationshipOneToOne<PaypalPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PaypalPaymentRel[] {\n\t\treturn super.relationshipOneToMany<PaypalPaymentRel>(...ids)\n\t}\n\n\n\ttype(): PaypalPaymentType {\n\t\treturn PaypalPayments.TYPE\n\t}\n\n}\n\n\nexport default PaypalPayments\n\nexport type { PaypalPayment, PaypalPaymentCreate, PaypalPaymentUpdate, PaypalPaymentType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { PromotionRule } from './promotion_rules'\nimport type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule, CustomPromotionRuleType } from './custom_promotion_rules'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\nimport type { Sku } from './skus'\n\n\ntype PercentageDiscountPromotionType = 'percentage_discount_promotions'\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype OrderAmountPromotionRuleRel = ResourceRel & { type: OrderAmountPromotionRuleType }\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype CouponCodesPromotionRuleRel = ResourceRel & { type: CouponCodesPromotionRuleType }\ntype CustomPromotionRuleRel = ResourceRel & { type: CustomPromotionRuleType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type PercentageDiscountPromotionSort = Pick<PercentageDiscountPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceSort\n// export type PercentageDiscountPromotionFilter = Pick<PercentageDiscountPromotion, 'id' | 'name' | 'currency_code' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceFilter\n\n\ninterface PercentageDiscountPromotion extends Resource {\n\t\n\treadonly type: PercentageDiscountPromotionType\n\n\tname: string\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at: string\n\texpires_at: string\n\ttotal_usage_limit?: number | null\n\ttotal_usage_count?: number | null\n\tactive?: boolean | null\n\tdisabled_at?: string | null\n\tpercentage: number\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface PercentageDiscountPromotionCreate extends ResourceCreate {\n\t\n\tname: string\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at: string\n\texpires_at: string\n\ttotal_usage_limit?: number | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\tpercentage: number\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface PercentageDiscountPromotionUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at?: string | null\n\texpires_at?: string | null\n\ttotal_usage_limit?: number | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\tpercentage?: number | null\n\n\tmarket?: MarketRel | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRuleRel | null\n\tsku_list_promotion_rule?: SkuListPromotionRuleRel | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null\n\tcustom_promotion_rule?: CustomPromotionRuleRel | null\n\tsku_list?: SkuListRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass PercentageDiscountPromotions extends ApiResource<PercentageDiscountPromotion> {\n\n\tstatic readonly TYPE: PercentageDiscountPromotionType = 'percentage_discount_promotions' as const\n\n\tasync create(resource: PercentageDiscountPromotionCreate, params?: QueryParamsRetrieve<PercentageDiscountPromotion>, options?: ResourcesConfig): Promise<PercentageDiscountPromotion> {\n\t\treturn this.resources.create<PercentageDiscountPromotionCreate, PercentageDiscountPromotion>({ ...resource, type: PercentageDiscountPromotions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PercentageDiscountPromotionUpdate, params?: QueryParamsRetrieve<PercentageDiscountPromotion>, options?: ResourcesConfig): Promise<PercentageDiscountPromotion> {\n\t\treturn this.resources.update<PercentageDiscountPromotionUpdate, PercentageDiscountPromotion>({ ...resource, type: PercentageDiscountPromotions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: PercentageDiscountPromotions.TYPE } : id, options)\n\t}\n\n\tasync market(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync skus(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _percentageDiscountPromotionId = (percentageDiscountPromotionId as PercentageDiscountPromotion).id || percentageDiscountPromotionId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync _disable(id: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<PercentageDiscountPromotion>, options?: ResourcesConfig): Promise<PercentageDiscountPromotion> {\n\t\treturn this.resources.update<PercentageDiscountPromotionUpdate, PercentageDiscountPromotion>({ id: (typeof id === 'string')? id: id.id, type: PercentageDiscountPromotions.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve<PercentageDiscountPromotion>, options?: ResourcesConfig): Promise<PercentageDiscountPromotion> {\n\t\treturn this.resources.update<PercentageDiscountPromotionUpdate, PercentageDiscountPromotion>({ id: (typeof id === 'string')? id: id.id, type: PercentageDiscountPromotions.TYPE, _enable: true }, params, options)\n\t}\n\n\n\tisPercentageDiscountPromotion(resource: any): resource is PercentageDiscountPromotion {\n\t\treturn resource.type && (resource.type === PercentageDiscountPromotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PercentageDiscountPromotionRel {\n\t\treturn super.relationshipOneToOne<PercentageDiscountPromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PercentageDiscountPromotionRel[] {\n\t\treturn super.relationshipOneToMany<PercentageDiscountPromotionRel>(...ids)\n\t}\n\n\n\ttype(): PercentageDiscountPromotionType {\n\t\treturn PercentageDiscountPromotions.TYPE\n\t}\n\n}\n\n\nexport default PercentageDiscountPromotions\n\nexport type { PercentageDiscountPromotion, PercentageDiscountPromotionCreate, PercentageDiscountPromotionUpdate, PercentageDiscountPromotionType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Price, PriceType } from './prices'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { Event } from './events'\n\n\ntype PriceFrequencyTierType = 'price_frequency_tiers'\ntype PriceFrequencyTierRel = ResourceRel & { type: PriceFrequencyTierType }\ntype PriceRel = ResourceRel & { type: PriceType }\n\n\nexport type PriceFrequencyTierSort = Pick<PriceFrequencyTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type PriceFrequencyTierFilter = Pick<PriceFrequencyTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface PriceFrequencyTier extends Resource {\n\t\n\treadonly type: PriceFrequencyTierType\n\n\tname: string\n\tup_to?: number | null\n\tprice_amount_cents: number\n\tprice_amount_float?: number | null\n\tformatted_price_amount?: string | null\n\n\tprice?: Price | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\tevents?: Event[] | null\n\n}\n\n\ninterface PriceFrequencyTierCreate extends ResourceCreate {\n\t\n\tname: string\n\tup_to?: number | null\n\tprice_amount_cents: number\n\n\tprice: PriceRel\n\n}\n\n\ninterface PriceFrequencyTierUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tup_to?: number | null\n\tprice_amount_cents?: number | null\n\n\tprice?: PriceRel | null\n\n}\n\n\nclass PriceFrequencyTiers extends ApiResource<PriceFrequencyTier> {\n\n\tstatic readonly TYPE: PriceFrequencyTierType = 'price_frequency_tiers' as const\n\n\tasync create(resource: PriceFrequencyTierCreate, params?: QueryParamsRetrieve<PriceFrequencyTier>, options?: ResourcesConfig): Promise<PriceFrequencyTier> {\n\t\treturn this.resources.create<PriceFrequencyTierCreate, PriceFrequencyTier>({ ...resource, type: PriceFrequencyTiers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceFrequencyTierUpdate, params?: QueryParamsRetrieve<PriceFrequencyTier>, options?: ResourcesConfig): Promise<PriceFrequencyTier> {\n\t\treturn this.resources.update<PriceFrequencyTierUpdate, PriceFrequencyTier>({ ...resource, type: PriceFrequencyTiers.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: PriceFrequencyTiers.TYPE } : id, options)\n\t}\n\n\tasync price(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsRetrieve<Price>, options?: ResourcesConfig): Promise<Price> {\n\t\tconst _priceFrequencyTierId = (priceFrequencyTierId as PriceFrequencyTier).id || priceFrequencyTierId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `price_frequency_tiers/${_priceFrequencyTierId}/price`, params, options) as unknown as Price\n\t}\n\n\tasync attachments(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceFrequencyTierId = (priceFrequencyTierId as PriceFrequencyTier).id || priceFrequencyTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `price_frequency_tiers/${_priceFrequencyTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceFrequencyTierId = (priceFrequencyTierId as PriceFrequencyTier).id || priceFrequencyTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_frequency_tiers/${_priceFrequencyTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync events(priceFrequencyTierId: string | PriceFrequencyTier, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _priceFrequencyTierId = (priceFrequencyTierId as PriceFrequencyTier).id || priceFrequencyTierId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `price_frequency_tiers/${_priceFrequencyTierId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\n\tisPriceFrequencyTier(resource: any): resource is PriceFrequencyTier {\n\t\treturn resource.type && (resource.type === PriceFrequencyTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceFrequencyTierRel {\n\t\treturn super.relationshipOneToOne<PriceFrequencyTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceFrequencyTierRel[] {\n\t\treturn super.relationshipOneToMany<PriceFrequencyTierRel>(...ids)\n\t}\n\n\n\ttype(): PriceFrequencyTierType {\n\t\treturn PriceFrequencyTiers.TYPE\n\t}\n\n}\n\n\nexport default PriceFrequencyTiers\n\nexport type { PriceFrequencyTier, PriceFrequencyTierCreate, PriceFrequencyTierUpdate, PriceFrequencyTierType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Price } from './prices'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype PriceListType = 'price_lists'\ntype PriceListRel = ResourceRel & { type: PriceListType }\n\n\nexport type PriceListSort = Pick<PriceList, 'id' | 'name' | 'code' | 'currency_code' | 'tax_included'> & ResourceSort\n// export type PriceListFilter = Pick<PriceList, 'id' | 'name' | 'code' | 'currency_code' | 'tax_included'> & ResourceFilter\n\n\ninterface PriceList extends Resource {\n\t\n\treadonly type: PriceListType\n\n\tname: string\n\tcode?: string | null\n\tcurrency_code: string\n\ttax_included?: boolean | null\n\n\tprices?: Price[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface PriceListCreate extends ResourceCreate {\n\t\n\tname: string\n\tcode?: string | null\n\tcurrency_code: string\n\ttax_included?: boolean | null\n\t\n}\n\n\ninterface PriceListUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tcode?: string | null\n\tcurrency_code?: string | null\n\ttax_included?: boolean | null\n\t\n}\n\n\nclass PriceLists extends ApiResource<PriceList> {\n\n\tstatic readonly TYPE: PriceListType = 'price_lists' as const\n\n\tasync create(resource: PriceListCreate, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\treturn this.resources.create<PriceListCreate, PriceList>({ ...resource, type: PriceLists.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceListUpdate, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\treturn this.resources.update<PriceListUpdate, PriceList>({ ...resource, type: PriceLists.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: PriceLists.TYPE } : id, options)\n\t}\n\n\tasync prices(priceListId: string | PriceList, params?: QueryParamsList<Price>, options?: ResourcesConfig): Promise<ListResponse<Price>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `price_lists/${_priceListId}/prices`, params, options) as unknown as ListResponse<Price>\n\t}\n\n\tasync attachments(priceListId: string | PriceList, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `price_lists/${_priceListId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceListId: string | PriceList, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceListId = (priceListId as PriceList).id || priceListId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_lists/${_priceListId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisPriceList(resource: any): resource is PriceList {\n\t\treturn resource.type && (resource.type === PriceLists.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceListRel {\n\t\treturn super.relationshipOneToOne<PriceListRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceListRel[] {\n\t\treturn super.relationshipOneToMany<PriceListRel>(...ids)\n\t}\n\n\n\ttype(): PriceListType {\n\t\treturn PriceLists.TYPE\n\t}\n\n}\n\n\nexport default PriceLists\n\nexport type { PriceList, PriceListCreate, PriceListUpdate, PriceListType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Price } from './prices'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype PriceTierType = 'price_tiers'\ntype PriceTierRel = ResourceRel & { type: PriceTierType }\n\n\nexport type PriceTierSort = Pick<PriceTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type PriceTierFilter = Pick<PriceTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface PriceTier extends Resource {\n\t\n\treadonly type: PriceTierType\n\n\tname: string\n\tup_to?: number | null\n\tprice_amount_cents: number\n\tprice_amount_float?: number | null\n\tformatted_price_amount?: string | null\n\n\tprice?: Price | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass PriceTiers extends ApiResource<PriceTier> {\n\n\tstatic readonly TYPE: PriceTierType = 'price_tiers' as const\n\n\tasync price(priceTierId: string | PriceTier, params?: QueryParamsRetrieve<Price>, options?: ResourcesConfig): Promise<Price> {\n\t\tconst _priceTierId = (priceTierId as PriceTier).id || priceTierId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `price_tiers/${_priceTierId}/price`, params, options) as unknown as Price\n\t}\n\n\tasync attachments(priceTierId: string | PriceTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceTierId = (priceTierId as PriceTier).id || priceTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `price_tiers/${_priceTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceTierId: string | PriceTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceTierId = (priceTierId as PriceTier).id || priceTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_tiers/${_priceTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisPriceTier(resource: any): resource is PriceTier {\n\t\treturn resource.type && (resource.type === PriceTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceTierRel {\n\t\treturn super.relationshipOneToOne<PriceTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceTierRel[] {\n\t\treturn super.relationshipOneToMany<PriceTierRel>(...ids)\n\t}\n\n\n\ttype(): PriceTierType {\n\t\treturn PriceTiers.TYPE\n\t}\n\n}\n\n\nexport default PriceTiers\n\nexport type { PriceTier, PriceTierType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Price, PriceType } from './prices'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { Event } from './events'\n\n\ntype PriceVolumeTierType = 'price_volume_tiers'\ntype PriceVolumeTierRel = ResourceRel & { type: PriceVolumeTierType }\ntype PriceRel = ResourceRel & { type: PriceType }\n\n\nexport type PriceVolumeTierSort = Pick<PriceVolumeTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type PriceVolumeTierFilter = Pick<PriceVolumeTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface PriceVolumeTier extends Resource {\n\t\n\treadonly type: PriceVolumeTierType\n\n\tname: string\n\tup_to?: number | null\n\tprice_amount_cents: number\n\tprice_amount_float?: number | null\n\tformatted_price_amount?: string | null\n\n\tprice?: Price | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\tevents?: Event[] | null\n\n}\n\n\ninterface PriceVolumeTierCreate extends ResourceCreate {\n\t\n\tname: string\n\tup_to?: number | null\n\tprice_amount_cents: number\n\n\tprice: PriceRel\n\n}\n\n\ninterface PriceVolumeTierUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tup_to?: number | null\n\tprice_amount_cents?: number | null\n\n\tprice?: PriceRel | null\n\n}\n\n\nclass PriceVolumeTiers extends ApiResource<PriceVolumeTier> {\n\n\tstatic readonly TYPE: PriceVolumeTierType = 'price_volume_tiers' as const\n\n\tasync create(resource: PriceVolumeTierCreate, params?: QueryParamsRetrieve<PriceVolumeTier>, options?: ResourcesConfig): Promise<PriceVolumeTier> {\n\t\treturn this.resources.create<PriceVolumeTierCreate, PriceVolumeTier>({ ...resource, type: PriceVolumeTiers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceVolumeTierUpdate, params?: QueryParamsRetrieve<PriceVolumeTier>, options?: ResourcesConfig): Promise<PriceVolumeTier> {\n\t\treturn this.resources.update<PriceVolumeTierUpdate, PriceVolumeTier>({ ...resource, type: PriceVolumeTiers.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: PriceVolumeTiers.TYPE } : id, options)\n\t}\n\n\tasync price(priceVolumeTierId: string | PriceVolumeTier, params?: QueryParamsRetrieve<Price>, options?: ResourcesConfig): Promise<Price> {\n\t\tconst _priceVolumeTierId = (priceVolumeTierId as PriceVolumeTier).id || priceVolumeTierId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `price_volume_tiers/${_priceVolumeTierId}/price`, params, options) as unknown as Price\n\t}\n\n\tasync attachments(priceVolumeTierId: string | PriceVolumeTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceVolumeTierId = (priceVolumeTierId as PriceVolumeTier).id || priceVolumeTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `price_volume_tiers/${_priceVolumeTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceVolumeTierId: string | PriceVolumeTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceVolumeTierId = (priceVolumeTierId as PriceVolumeTier).id || priceVolumeTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `price_volume_tiers/${_priceVolumeTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync events(priceVolumeTierId: string | PriceVolumeTier, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _priceVolumeTierId = (priceVolumeTierId as PriceVolumeTier).id || priceVolumeTierId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `price_volume_tiers/${_priceVolumeTierId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\n\tisPriceVolumeTier(resource: any): resource is PriceVolumeTier {\n\t\treturn resource.type && (resource.type === PriceVolumeTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceVolumeTierRel {\n\t\treturn super.relationshipOneToOne<PriceVolumeTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceVolumeTierRel[] {\n\t\treturn super.relationshipOneToMany<PriceVolumeTierRel>(...ids)\n\t}\n\n\n\ttype(): PriceVolumeTierType {\n\t\treturn PriceVolumeTiers.TYPE\n\t}\n\n}\n\n\nexport default PriceVolumeTiers\n\nexport type { PriceVolumeTier, PriceVolumeTierCreate, PriceVolumeTierUpdate, PriceVolumeTierType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PriceList, PriceListType } from './price_lists'\nimport type { Sku, SkuType } from './skus'\nimport type { PriceTier, PriceTierType } from './price_tiers'\nimport type { PriceVolumeTier } from './price_volume_tiers'\nimport type { PriceFrequencyTier } from './price_frequency_tiers'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { Customer } from './customers'\nimport type { Market } from './markets'\nimport type { StockLocation } from './stock_locations'\n\n\ntype PriceType = 'prices'\ntype PriceRel = ResourceRel & { type: PriceType }\ntype PriceListRel = ResourceRel & { type: PriceListType }\ntype SkuRel = ResourceRel & { type: SkuType }\ntype PriceTierRel = ResourceRel & { type: PriceTierType }\n\n\nexport type PriceSort = Pick<Price, 'id' | 'currency_code' | 'amount_cents' | 'compare_at_amount_cents'> & ResourceSort\n// export type PriceFilter = Pick<Price, 'id' | 'currency_code' | 'amount_cents' | 'compare_at_amount_cents'> & ResourceFilter\n\n\ninterface Price extends Resource {\n\t\n\treadonly type: PriceType\n\n\tcurrency_code?: string | null\n\tsku_code?: string | null\n\tamount_cents: number\n\tamount_float?: number | null\n\tformatted_amount?: string | null\n\tcompare_at_amount_cents?: number | null\n\tcompare_at_amount_float?: number | null\n\tformatted_compare_at_amount?: string | null\n\n\tprice_list?: PriceList | null\n\tsku?: Sku | null\n\tprice_tiers?: PriceTier[] | null\n\tprice_volume_tiers?: PriceVolumeTier[] | null\n\tprice_frequency_tiers?: PriceFrequencyTier[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\tjwt_customer?: Customer | null\n\tjwt_markets?: Market[] | null\n\tjwt_stock_locations?: StockLocation[] | null\n\n}\n\n\ninterface PriceCreate extends ResourceCreate {\n\t\n\tsku_code?: string | null\n\tamount_cents: number\n\tcompare_at_amount_cents?: number | null\n\n\tprice_list: PriceListRel\n\tsku: SkuRel\n\tprice_tiers?: PriceTierRel[] | null\n\n}\n\n\ninterface PriceUpdate extends ResourceUpdate {\n\t\n\tsku_code?: string | null\n\tamount_cents?: number | null\n\tcompare_at_amount_cents?: number | null\n\n\tprice_list?: PriceListRel | null\n\tsku?: SkuRel | null\n\tprice_tiers?: PriceTierRel[] | null\n\n}\n\n\nclass Prices extends ApiResource<Price> {\n\n\tstatic readonly TYPE: PriceType = 'prices' as const\n\n\tasync create(resource: PriceCreate, params?: QueryParamsRetrieve<Price>, options?: ResourcesConfig): Promise<Price> {\n\t\treturn this.resources.create<PriceCreate, Price>({ ...resource, type: Prices.TYPE }, params, options)\n\t}\n\n\tasync update(resource: PriceUpdate, params?: QueryParamsRetrieve<Price>, options?: ResourcesConfig): Promise<Price> {\n\t\treturn this.resources.update<PriceUpdate, Price>({ ...resource, type: Prices.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Prices.TYPE } : id, options)\n\t}\n\n\tasync price_list(priceId: string | Price, params?: QueryParamsRetrieve<PriceList>, options?: ResourcesConfig): Promise<PriceList> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<PriceList>({ type: 'price_lists' }, `prices/${_priceId}/price_list`, params, options) as unknown as PriceList\n\t}\n\n\tasync sku(priceId: string | Price, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `prices/${_priceId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync price_tiers(priceId: string | Price, params?: QueryParamsList<PriceTier>, options?: ResourcesConfig): Promise<ListResponse<PriceTier>> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<PriceTier>({ type: 'price_tiers' }, `prices/${_priceId}/price_tiers`, params, options) as unknown as ListResponse<PriceTier>\n\t}\n\n\tasync price_volume_tiers(priceId: string | Price, params?: QueryParamsList<PriceVolumeTier>, options?: ResourcesConfig): Promise<ListResponse<PriceVolumeTier>> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<PriceVolumeTier>({ type: 'price_volume_tiers' }, `prices/${_priceId}/price_volume_tiers`, params, options) as unknown as ListResponse<PriceVolumeTier>\n\t}\n\n\tasync price_frequency_tiers(priceId: string | Price, params?: QueryParamsList<PriceFrequencyTier>, options?: ResourcesConfig): Promise<ListResponse<PriceFrequencyTier>> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<PriceFrequencyTier>({ type: 'price_frequency_tiers' }, `prices/${_priceId}/price_frequency_tiers`, params, options) as unknown as ListResponse<PriceFrequencyTier>\n\t}\n\n\tasync attachments(priceId: string | Price, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `prices/${_priceId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(priceId: string | Price, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `prices/${_priceId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync jwt_customer(priceId: string | Price, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `prices/${_priceId}/jwt_customer`, params, options) as unknown as Customer\n\t}\n\n\tasync jwt_markets(priceId: string | Price, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `prices/${_priceId}/jwt_markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync jwt_stock_locations(priceId: string | Price, params?: QueryParamsList<StockLocation>, options?: ResourcesConfig): Promise<ListResponse<StockLocation>> {\n\t\tconst _priceId = (priceId as Price).id || priceId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `prices/${_priceId}/jwt_stock_locations`, params, options) as unknown as ListResponse<StockLocation>\n\t}\n\n\n\tisPrice(resource: any): resource is Price {\n\t\treturn resource.type && (resource.type === Prices.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PriceRel {\n\t\treturn super.relationshipOneToOne<PriceRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PriceRel[] {\n\t\treturn super.relationshipOneToMany<PriceRel>(...ids)\n\t}\n\n\n\ttype(): PriceType {\n\t\treturn Prices.TYPE\n\t}\n\n}\n\n\nexport default Prices\n\nexport type { Price, PriceCreate, PriceUpdate, PriceType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsList } from '../query'\n\nimport type { PercentageDiscountPromotion } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion } from './free_gift_promotions'\nimport type { FixedPricePromotion } from './fixed_price_promotions'\nimport type { ExternalPromotion } from './external_promotions'\nimport type { FixedAmountPromotion } from './fixed_amount_promotions'\nimport type { Version } from './versions'\n\n\ntype PromotionRuleType = 'promotion_rules'\ntype PromotionRuleRel = ResourceRel & { type: PromotionRuleType }\n\n\nexport type PromotionRuleSort = Pick<PromotionRule, 'id'> & ResourceSort\n// export type PromotionRuleFilter = Pick<PromotionRule, 'id'> & ResourceFilter\n\n\ninterface PromotionRule extends Resource {\n\t\n\treadonly type: PromotionRuleType\n\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | null\n\tversions?: Version[] | null\n\n}\n\n\nclass PromotionRules extends ApiResource<PromotionRule> {\n\n\tstatic readonly TYPE: PromotionRuleType = 'promotion_rules' as const\n\n\tasync versions(promotionRuleId: string | PromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _promotionRuleId = (promotionRuleId as PromotionRule).id || promotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `promotion_rules/${_promotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisPromotionRule(resource: any): resource is PromotionRule {\n\t\treturn resource.type && (resource.type === PromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PromotionRuleRel {\n\t\treturn super.relationshipOneToOne<PromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<PromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): PromotionRuleType {\n\t\treturn PromotionRules.TYPE\n\t}\n\n}\n\n\nexport default PromotionRules\n\nexport type { PromotionRule, PromotionRuleType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { PromotionRule } from './promotion_rules'\nimport type { OrderAmountPromotionRule } from './order_amount_promotion_rules'\nimport type { SkuListPromotionRule } from './sku_list_promotion_rules'\nimport type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules'\nimport type { CustomPromotionRule } from './custom_promotion_rules'\nimport type { SkuList } from './sku_lists'\nimport type { Coupon } from './coupons'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag } from './tags'\nimport type { Version } from './versions'\n\n\ntype PromotionType = 'promotions'\ntype PromotionRel = ResourceRel & { type: PromotionType }\n\n\nexport type PromotionSort = Pick<Promotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceSort\n// export type PromotionFilter = Pick<Promotion, 'id' | 'name' | 'currency_code' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceFilter\n\n\ninterface Promotion extends Resource {\n\t\n\treadonly type: PromotionType\n\n\tname: string\n\tcurrency_code?: string | null\n\texclusive?: boolean | null\n\tpriority?: number | null\n\tstarts_at: string\n\texpires_at: string\n\ttotal_usage_limit?: number | null\n\ttotal_usage_count?: number | null\n\tactive?: boolean | null\n\tdisabled_at?: string | null\n\n\tmarket?: Market | null\n\tpromotion_rules?: PromotionRule[] | null\n\torder_amount_promotion_rule?: OrderAmountPromotionRule | null\n\tsku_list_promotion_rule?: SkuListPromotionRule | null\n\tcoupon_codes_promotion_rule?: CouponCodesPromotionRule | null\n\tcustom_promotion_rule?: CustomPromotionRule | null\n\tsku_list?: SkuList | null\n\tcoupons?: Coupon[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass Promotions extends ApiResource<Promotion> {\n\n\tstatic readonly TYPE: PromotionType = 'promotions' as const\n\n\tasync market(promotionId: string | Promotion, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _promotionId = (promotionId as Promotion).id || promotionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `promotions/${_promotionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync order_amount_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve<OrderAmountPromotionRule>, options?: ResourcesConfig): Promise<OrderAmountPromotionRule> {\n\t\tconst _promotionId = (promotionId as Promotion).id || promotionId as string\n\t\treturn this.resources.fetch<OrderAmountPromotionRule>({ type: 'order_amount_promotion_rules' }, `promotions/${_promotionId}/order_amount_promotion_rule`, params, options) as unknown as OrderAmountPromotionRule\n\t}\n\n\tasync sku_list_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\tconst _promotionId = (promotionId as Promotion).id || promotionId as string\n\t\treturn this.resources.fetch<SkuListPromotionRule>({ type: 'sku_list_promotion_rules' }, `promotions/${_promotionId}/sku_list_promotion_rule`, params, options) as unknown as SkuListPromotionRule\n\t}\n\n\tasync coupon_codes_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve<CouponCodesPromotionRule>, options?: ResourcesConfig): Promise<CouponCodesPromotionRule> {\n\t\tconst _promotionId = (promotionId as Promotion).id || promotionId as string\n\t\treturn this.resources.fetch<CouponCodesPromotionRule>({ type: 'coupon_codes_promotion_rules' }, `promotions/${_promotionId}/coupon_codes_promotion_rule`, params, options) as unknown as CouponCodesPromotionRule\n\t}\n\n\tasync custom_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve<CustomPromotionRule>, options?: ResourcesConfig): Promise<CustomPromotionRule> {\n\t\tconst _promotionId = (promotionId as Promotion).id || promotionId as string\n\t\treturn this.resources.fetch<CustomPromotionRule>({ type: 'custom_promotion_rules' }, `promotions/${_promotionId}/custom_promotion_rule`, params, options) as unknown as CustomPromotionRule\n\t}\n\n\tasync sku_list(promotionId: string | Promotion, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _promotionId = (promotionId as Promotion).id || promotionId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `promotions/${_promotionId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync coupons(promotionId: string | Promotion, params?: QueryParamsList<Coupon>, options?: ResourcesConfig): Promise<ListResponse<Coupon>> {\n\t\tconst _promotionId = (promotionId as Promotion).id || promotionId as string\n\t\treturn this.resources.fetch<Coupon>({ type: 'coupons' }, `promotions/${_promotionId}/coupons`, params, options) as unknown as ListResponse<Coupon>\n\t}\n\n\tasync attachments(promotionId: string | Promotion, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _promotionId = (promotionId as Promotion).id || promotionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `promotions/${_promotionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(promotionId: string | Promotion, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _promotionId = (promotionId as Promotion).id || promotionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `promotions/${_promotionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(promotionId: string | Promotion, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _promotionId = (promotionId as Promotion).id || promotionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `promotions/${_promotionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(promotionId: string | Promotion, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _promotionId = (promotionId as Promotion).id || promotionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `promotions/${_promotionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisPromotion(resource: any): resource is Promotion {\n\t\treturn resource.type && (resource.type === Promotions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): PromotionRel {\n\t\treturn super.relationshipOneToOne<PromotionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): PromotionRel[] {\n\t\treturn super.relationshipOneToMany<PromotionRel>(...ids)\n\t}\n\n\n\ttype(): PromotionType {\n\t\treturn Promotions.TYPE\n\t}\n\n}\n\n\nexport default Promotions\n\nexport type { Promotion, PromotionType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { Event } from './events'\nimport type { OrderSubscription, OrderSubscriptionType } from './order_subscriptions'\n\n\ntype RecurringOrderCopyType = 'recurring_order_copies'\ntype RecurringOrderCopyRel = ResourceRel & { type: RecurringOrderCopyType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype OrderSubscriptionRel = ResourceRel & { type: OrderSubscriptionType }\n\n\nexport type RecurringOrderCopySort = Pick<RecurringOrderCopy, 'id' | 'status' | 'started_at' | 'completed_at' | 'failed_at' | 'errors_count'> & ResourceSort\n// export type RecurringOrderCopyFilter = Pick<RecurringOrderCopy, 'id' | 'status' | 'started_at' | 'completed_at' | 'failed_at' | 'errors_count'> & ResourceFilter\n\n\ninterface RecurringOrderCopy extends Resource {\n\t\n\treadonly type: RecurringOrderCopyType\n\n\tstatus: 'pending' | 'in_progress' | 'failed' | 'completed'\n\tstarted_at?: string | null\n\tcompleted_at?: string | null\n\tfailed_at?: string | null\n\terrors_log?: Record<string, any> | null\n\terrors_count?: number | null\n\tplace_target_order?: boolean | null\n\treuse_wallet?: boolean | null\n\n\tsource_order?: Order | null\n\ttarget_order?: Order | null\n\tevents?: Event[] | null\n\torder_subscription?: OrderSubscription | null\n\n}\n\n\ninterface RecurringOrderCopyCreate extends ResourceCreate {\n\t\n\tplace_target_order?: boolean | null\n\treuse_wallet?: boolean | null\n\n\tsource_order: OrderRel\n\torder_subscription: OrderSubscriptionRel\n\n}\n\n\ntype RecurringOrderCopyUpdate = ResourceUpdate\n\n\nclass RecurringOrderCopies extends ApiResource<RecurringOrderCopy> {\n\n\tstatic readonly TYPE: RecurringOrderCopyType = 'recurring_order_copies' as const\n\n\tasync create(resource: RecurringOrderCopyCreate, params?: QueryParamsRetrieve<RecurringOrderCopy>, options?: ResourcesConfig): Promise<RecurringOrderCopy> {\n\t\treturn this.resources.create<RecurringOrderCopyCreate, RecurringOrderCopy>({ ...resource, type: RecurringOrderCopies.TYPE }, params, options)\n\t}\n\n\tasync update(resource: RecurringOrderCopyUpdate, params?: QueryParamsRetrieve<RecurringOrderCopy>, options?: ResourcesConfig): Promise<RecurringOrderCopy> {\n\t\treturn this.resources.update<RecurringOrderCopyUpdate, RecurringOrderCopy>({ ...resource, type: RecurringOrderCopies.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: RecurringOrderCopies.TYPE } : id, options)\n\t}\n\n\tasync source_order(recurringOrderCopyId: string | RecurringOrderCopy, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _recurringOrderCopyId = (recurringOrderCopyId as RecurringOrderCopy).id || recurringOrderCopyId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `recurring_order_copies/${_recurringOrderCopyId}/source_order`, params, options) as unknown as Order\n\t}\n\n\tasync target_order(recurringOrderCopyId: string | RecurringOrderCopy, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _recurringOrderCopyId = (recurringOrderCopyId as RecurringOrderCopy).id || recurringOrderCopyId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `recurring_order_copies/${_recurringOrderCopyId}/target_order`, params, options) as unknown as Order\n\t}\n\n\tasync events(recurringOrderCopyId: string | RecurringOrderCopy, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _recurringOrderCopyId = (recurringOrderCopyId as RecurringOrderCopy).id || recurringOrderCopyId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `recurring_order_copies/${_recurringOrderCopyId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync order_subscription(recurringOrderCopyId: string | RecurringOrderCopy, params?: QueryParamsRetrieve<OrderSubscription>, options?: ResourcesConfig): Promise<OrderSubscription> {\n\t\tconst _recurringOrderCopyId = (recurringOrderCopyId as RecurringOrderCopy).id || recurringOrderCopyId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `recurring_order_copies/${_recurringOrderCopyId}/order_subscription`, params, options) as unknown as OrderSubscription\n\t}\n\n\n\tisRecurringOrderCopy(resource: any): resource is RecurringOrderCopy {\n\t\treturn resource.type && (resource.type === RecurringOrderCopies.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): RecurringOrderCopyRel {\n\t\treturn super.relationshipOneToOne<RecurringOrderCopyRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): RecurringOrderCopyRel[] {\n\t\treturn super.relationshipOneToMany<RecurringOrderCopyRel>(...ids)\n\t}\n\n\n\ttype(): RecurringOrderCopyType {\n\t\treturn RecurringOrderCopies.TYPE\n\t}\n\n}\n\n\nexport default RecurringOrderCopies\n\nexport type { RecurringOrderCopy, RecurringOrderCopyCreate, RecurringOrderCopyUpdate, RecurringOrderCopyType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order } from './orders'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { Capture } from './captures'\n\n\ntype RefundType = 'refunds'\ntype RefundRel = ResourceRel & { type: RefundType }\n\n\nexport type RefundSort = Pick<Refund, 'id' | 'number' | 'amount_cents'> & ResourceSort\n// export type RefundFilter = Pick<Refund, 'id' | 'number' | 'currency_code' | 'amount_cents' | 'succeeded' | 'message' | 'error_code' | 'error_detail' | 'token' | 'gateway_transaction_id'> & ResourceFilter\n\n\ninterface Refund extends Resource {\n\t\n\treadonly type: RefundType\n\n\tnumber: string\n\tcurrency_code: string\n\tamount_cents: number\n\tamount_float: number\n\tformatted_amount: string\n\tsucceeded: boolean\n\tmessage?: string | null\n\terror_code?: string | null\n\terror_detail?: string | null\n\ttoken?: string | null\n\tgateway_transaction_id?: string | null\n\n\torder?: Order | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\treference_capture?: Capture | null\n\n}\n\n\nclass Refunds extends ApiResource<Refund> {\n\n\tstatic readonly TYPE: RefundType = 'refunds' as const\n\n\tasync order(refundId: string | Refund, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `refunds/${_refundId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(refundId: string | Refund, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `refunds/${_refundId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(refundId: string | Refund, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `refunds/${_refundId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(refundId: string | Refund, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `refunds/${_refundId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync reference_capture(refundId: string | Refund, params?: QueryParamsRetrieve<Capture>, options?: ResourcesConfig): Promise<Capture> {\n\t\tconst _refundId = (refundId as Refund).id || refundId as string\n\t\treturn this.resources.fetch<Capture>({ type: 'captures' }, `refunds/${_refundId}/reference_capture`, params, options) as unknown as Capture\n\t}\n\n\n\tisRefund(resource: any): resource is Refund {\n\t\treturn resource.type && (resource.type === Refunds.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): RefundRel {\n\t\treturn super.relationshipOneToOne<RefundRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): RefundRel[] {\n\t\treturn super.relationshipOneToMany<RefundRel>(...ids)\n\t}\n\n\n\ttype(): RefundType {\n\t\treturn Refunds.TYPE\n\t}\n\n}\n\n\nexport default Refunds\n\nexport type { Refund, RefundType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { StockItem } from './stock_items'\nimport type { Sku } from './skus'\nimport type { StockReservation } from './stock_reservations'\n\n\ntype ReservedStockType = 'reserved_stocks'\ntype ReservedStockRel = ResourceRel & { type: ReservedStockType }\n\n\nexport type ReservedStockSort = Pick<ReservedStock, 'id' | 'quantity'> & ResourceSort\n// export type ReservedStockFilter = Pick<ReservedStock, 'id' | 'quantity'> & ResourceFilter\n\n\ninterface ReservedStock extends Resource {\n\t\n\treadonly type: ReservedStockType\n\n\tquantity: number\n\n\tstock_item?: StockItem | null\n\tsku?: Sku | null\n\tstock_reservations?: StockReservation[] | null\n\n}\n\n\nclass ReservedStocks extends ApiResource<ReservedStock> {\n\n\tstatic readonly TYPE: ReservedStockType = 'reserved_stocks' as const\n\n\tasync stock_item(reservedStockId: string | ReservedStock, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\tconst _reservedStockId = (reservedStockId as ReservedStock).id || reservedStockId as string\n\t\treturn this.resources.fetch<StockItem>({ type: 'stock_items' }, `reserved_stocks/${_reservedStockId}/stock_item`, params, options) as unknown as StockItem\n\t}\n\n\tasync sku(reservedStockId: string | ReservedStock, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _reservedStockId = (reservedStockId as ReservedStock).id || reservedStockId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `reserved_stocks/${_reservedStockId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync stock_reservations(reservedStockId: string | ReservedStock, params?: QueryParamsList<StockReservation>, options?: ResourcesConfig): Promise<ListResponse<StockReservation>> {\n\t\tconst _reservedStockId = (reservedStockId as ReservedStock).id || reservedStockId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `reserved_stocks/${_reservedStockId}/stock_reservations`, params, options) as unknown as ListResponse<StockReservation>\n\t}\n\n\n\tisReservedStock(resource: any): resource is ReservedStock {\n\t\treturn resource.type && (resource.type === ReservedStocks.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ReservedStockRel {\n\t\treturn super.relationshipOneToOne<ReservedStockRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ReservedStockRel[] {\n\t\treturn super.relationshipOneToMany<ReservedStockRel>(...ids)\n\t}\n\n\n\ttype(): ReservedStockType {\n\t\treturn ReservedStocks.TYPE\n\t}\n\n}\n\n\nexport default ReservedStocks\n\nexport type { ReservedStock, ReservedStockType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\n\n\nimport type { Order } from './orders'\n\n\ntype ResourceErrorType = 'resource_errors'\ntype ResourceErrorRel = ResourceRel & { type: ResourceErrorType }\n\n\nexport type ResourceErrorSort = Pick<ResourceError, 'id' | 'name' | 'code'> & ResourceSort\n// export type ResourceErrorFilter = Pick<ResourceError, 'id' | 'name' | 'code' | 'message'> & ResourceFilter\n\n\ninterface ResourceError extends Resource {\n\t\n\treadonly type: ResourceErrorType\n\n\tname: string\n\tcode: string\n\tmessage: string\n\n\tresource?: Order | null\n\n}\n\n\nclass ResourceErrors extends ApiResource<ResourceError> {\n\n\tstatic readonly TYPE: ResourceErrorType = 'resource_errors' as const\n\n\t\n\n\n\tisResourceError(resource: any): resource is ResourceError {\n\t\treturn resource.type && (resource.type === ResourceErrors.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ResourceErrorRel {\n\t\treturn super.relationshipOneToOne<ResourceErrorRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ResourceErrorRel[] {\n\t\treturn super.relationshipOneToMany<ResourceErrorRel>(...ids)\n\t}\n\n\n\ttype(): ResourceErrorType {\n\t\treturn ResourceErrors.TYPE\n\t}\n\n}\n\n\nexport default ResourceErrors\n\nexport type { ResourceError, ResourceErrorType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\nimport type { Return, ReturnType } from './returns'\nimport type { LineItem, LineItemType } from './line_items'\n\n\ntype ReturnLineItemType = 'return_line_items'\ntype ReturnLineItemRel = ResourceRel & { type: ReturnLineItemType }\ntype ReturnRel = ResourceRel & { type: ReturnType }\ntype LineItemRel = ResourceRel & { type: LineItemType }\n\n\nexport type ReturnLineItemSort = Pick<ReturnLineItem, 'id' | 'quantity' | 'restocked_at'> & ResourceSort\n// export type ReturnLineItemFilter = Pick<ReturnLineItem, 'id' | 'quantity' | 'return_reason' | 'restocked_at'> & ResourceFilter\n\n\ninterface ReturnLineItem extends Resource {\n\t\n\treadonly type: ReturnLineItemType\n\n\tsku_code?: string | null\n\tbundle_code?: string | null\n\tquantity: number\n\tname?: string | null\n\timage_url?: string | null\n\treturn_reason?: Record<string, any> | null\n\trestocked_at?: string | null\n\n\treturn?: Return | null\n\tline_item?: LineItem | null\n\n}\n\n\ninterface ReturnLineItemCreate extends ResourceCreate {\n\t\n\tquantity: number\n\treturn_reason?: Record<string, any> | null\n\n\treturn: ReturnRel\n\tline_item: LineItemRel\n\n}\n\n\ninterface ReturnLineItemUpdate extends ResourceUpdate {\n\t\n\tquantity?: number | null\n\t_restock?: boolean | null\n\treturn_reason?: Record<string, any> | null\n\t\n}\n\n\nclass ReturnLineItems extends ApiResource<ReturnLineItem> {\n\n\tstatic readonly TYPE: ReturnLineItemType = 'return_line_items' as const\n\n\tasync create(resource: ReturnLineItemCreate, params?: QueryParamsRetrieve<ReturnLineItem>, options?: ResourcesConfig): Promise<ReturnLineItem> {\n\t\treturn this.resources.create<ReturnLineItemCreate, ReturnLineItem>({ ...resource, type: ReturnLineItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ReturnLineItemUpdate, params?: QueryParamsRetrieve<ReturnLineItem>, options?: ResourcesConfig): Promise<ReturnLineItem> {\n\t\treturn this.resources.update<ReturnLineItemUpdate, ReturnLineItem>({ ...resource, type: ReturnLineItems.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: ReturnLineItems.TYPE } : id, options)\n\t}\n\n\tasync return(returnLineItemId: string | ReturnLineItem, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\tconst _returnLineItemId = (returnLineItemId as ReturnLineItem).id || returnLineItemId as string\n\t\treturn this.resources.fetch<Return>({ type: 'returns' }, `return_line_items/${_returnLineItemId}/return`, params, options) as unknown as Return\n\t}\n\n\tasync line_item(returnLineItemId: string | ReturnLineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\tconst _returnLineItemId = (returnLineItemId as ReturnLineItem).id || returnLineItemId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `return_line_items/${_returnLineItemId}/line_item`, params, options) as unknown as LineItem\n\t}\n\n\tasync _restock(id: string | ReturnLineItem, params?: QueryParamsRetrieve<ReturnLineItem>, options?: ResourcesConfig): Promise<ReturnLineItem> {\n\t\treturn this.resources.update<ReturnLineItemUpdate, ReturnLineItem>({ id: (typeof id === 'string')? id: id.id, type: ReturnLineItems.TYPE, _restock: true }, params, options)\n\t}\n\n\n\tisReturnLineItem(resource: any): resource is ReturnLineItem {\n\t\treturn resource.type && (resource.type === ReturnLineItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ReturnLineItemRel {\n\t\treturn super.relationshipOneToOne<ReturnLineItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ReturnLineItemRel[] {\n\t\treturn super.relationshipOneToMany<ReturnLineItemRel>(...ids)\n\t}\n\n\n\ttype(): ReturnLineItemType {\n\t\treturn ReturnLineItems.TYPE\n\t}\n\n}\n\n\nexport default ReturnLineItems\n\nexport type { ReturnLineItem, ReturnLineItemCreate, ReturnLineItemUpdate, ReturnLineItemType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { Customer } from './customers'\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { Address } from './addresses'\nimport type { ReturnLineItem } from './return_line_items'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype ReturnType = 'returns'\ntype ReturnRel = ResourceRel & { type: ReturnType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type ReturnSort = Pick<Return, 'id' | 'number' | 'status' | 'approved_at' | 'cancelled_at' | 'shipped_at' | 'rejected_at' | 'received_at' | 'archived_at'> & ResourceSort\n// export type ReturnFilter = Pick<Return, 'id' | 'number' | 'status' | 'skus_count' | 'approved_at' | 'cancelled_at' | 'shipped_at' | 'rejected_at' | 'received_at' | 'archived_at'> & ResourceFilter\n\n\ninterface Return extends Resource {\n\t\n\treadonly type: ReturnType\n\n\tnumber?: string | null\n\tstatus: 'draft' | 'requested' | 'approved' | 'cancelled' | 'shipped' | 'rejected' | 'received'\n\tcustomer_email?: string | null\n\tskus_count?: number | null\n\tapproved_at?: string | null\n\tcancelled_at?: string | null\n\tshipped_at?: string | null\n\trejected_at?: string | null\n\treceived_at?: string | null\n\tarchived_at?: string | null\n\n\torder?: Order | null\n\tcustomer?: Customer | null\n\tstock_location?: StockLocation | null\n\torigin_address?: Address | null\n\tdestination_address?: Address | null\n\treturn_line_items?: ReturnLineItem[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ReturnCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\tstock_location?: StockLocationRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface ReturnUpdate extends ResourceUpdate {\n\t\n\t_request?: boolean | null\n\t_approve?: boolean | null\n\t_cancel?: boolean | null\n\t_ship?: boolean | null\n\t_reject?: boolean | null\n\t_receive?: boolean | null\n\t_restock?: boolean | null\n\t_archive?: boolean | null\n\t_unarchive?: boolean | null\n\n\tstock_location?: StockLocationRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Returns extends ApiResource<Return> {\n\n\tstatic readonly TYPE: ReturnType = 'returns' as const\n\n\tasync create(resource: ReturnCreate, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.create<ReturnCreate, Return>({ ...resource, type: Returns.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ReturnUpdate, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ ...resource, type: Returns.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Returns.TYPE } : id, options)\n\t}\n\n\tasync order(returnId: string | Return, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `returns/${_returnId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync customer(returnId: string | Return, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `returns/${_returnId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync stock_location(returnId: string | Return, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `returns/${_returnId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync origin_address(returnId: string | Return, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `returns/${_returnId}/origin_address`, params, options) as unknown as Address\n\t}\n\n\tasync destination_address(returnId: string | Return, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `returns/${_returnId}/destination_address`, params, options) as unknown as Address\n\t}\n\n\tasync return_line_items(returnId: string | Return, params?: QueryParamsList<ReturnLineItem>, options?: ResourcesConfig): Promise<ListResponse<ReturnLineItem>> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<ReturnLineItem>({ type: 'return_line_items' }, `returns/${_returnId}/return_line_items`, params, options) as unknown as ListResponse<ReturnLineItem>\n\t}\n\n\tasync attachments(returnId: string | Return, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `returns/${_returnId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(returnId: string | Return, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `returns/${_returnId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(returnId: string | Return, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `returns/${_returnId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(returnId: string | Return, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _returnId = (returnId as Return).id || returnId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `returns/${_returnId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _request(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _request: true }, params, options)\n\t}\n\n\tasync _approve(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _approve: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _cancel: true }, params, options)\n\t}\n\n\tasync _ship(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _ship: true }, params, options)\n\t}\n\n\tasync _reject(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _reject: true }, params, options)\n\t}\n\n\tasync _receive(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _receive: true }, params, options)\n\t}\n\n\tasync _restock(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _restock: true }, params, options)\n\t}\n\n\tasync _archive(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _archive: true }, params, options)\n\t}\n\n\tasync _unarchive(id: string | Return, params?: QueryParamsRetrieve<Return>, options?: ResourcesConfig): Promise<Return> {\n\t\treturn this.resources.update<ReturnUpdate, Return>({ id: (typeof id === 'string')? id: id.id, type: Returns.TYPE, _unarchive: true }, params, options)\n\t}\n\n\n\tisReturn(resource: any): resource is Return {\n\t\treturn resource.type && (resource.type === Returns.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ReturnRel {\n\t\treturn super.relationshipOneToOne<ReturnRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ReturnRel[] {\n\t\treturn super.relationshipOneToMany<ReturnRel>(...ids)\n\t}\n\n\n\ttype(): ReturnType {\n\t\treturn Returns.TYPE\n\t}\n\n}\n\n\nexport default Returns\n\nexport type { Return, ReturnCreate, ReturnUpdate, ReturnType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { SatispayPayment, SatispayPaymentType } from './satispay_payments'\n\n\ntype SatispayGatewayType = 'satispay_gateways'\ntype SatispayGatewayRel = ResourceRel & { type: SatispayGatewayType }\ntype SatispayPaymentRel = ResourceRel & { type: SatispayPaymentType }\n\n\nexport type SatispayGatewaySort = Pick<SatispayGateway, 'id' | 'name'> & ResourceSort\n// export type SatispayGatewayFilter = Pick<SatispayGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface SatispayGateway extends Resource {\n\t\n\treadonly type: SatispayGatewayType\n\n\tname: string\n\ttoken: string\n\tkey_id: string\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tsatispay_payments?: SatispayPayment[] | null\n\n}\n\n\ninterface SatispayGatewayCreate extends ResourceCreate {\n\t\n\tname: string\n\ttoken: string\n\n\tsatispay_payments?: SatispayPaymentRel[] | null\n\n}\n\n\ninterface SatispayGatewayUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\n\tsatispay_payments?: SatispayPaymentRel[] | null\n\n}\n\n\nclass SatispayGateways extends ApiResource<SatispayGateway> {\n\n\tstatic readonly TYPE: SatispayGatewayType = 'satispay_gateways' as const\n\n\tasync create(resource: SatispayGatewayCreate, params?: QueryParamsRetrieve<SatispayGateway>, options?: ResourcesConfig): Promise<SatispayGateway> {\n\t\treturn this.resources.create<SatispayGatewayCreate, SatispayGateway>({ ...resource, type: SatispayGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SatispayGatewayUpdate, params?: QueryParamsRetrieve<SatispayGateway>, options?: ResourcesConfig): Promise<SatispayGateway> {\n\t\treturn this.resources.update<SatispayGatewayUpdate, SatispayGateway>({ ...resource, type: SatispayGateways.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: SatispayGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(satispayGatewayId: string | SatispayGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _satispayGatewayId = (satispayGatewayId as SatispayGateway).id || satispayGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `satispay_gateways/${_satispayGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(satispayGatewayId: string | SatispayGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _satispayGatewayId = (satispayGatewayId as SatispayGateway).id || satispayGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `satispay_gateways/${_satispayGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync satispay_payments(satispayGatewayId: string | SatispayGateway, params?: QueryParamsList<SatispayPayment>, options?: ResourcesConfig): Promise<ListResponse<SatispayPayment>> {\n\t\tconst _satispayGatewayId = (satispayGatewayId as SatispayGateway).id || satispayGatewayId as string\n\t\treturn this.resources.fetch<SatispayPayment>({ type: 'satispay_payments' }, `satispay_gateways/${_satispayGatewayId}/satispay_payments`, params, options) as unknown as ListResponse<SatispayPayment>\n\t}\n\n\n\tisSatispayGateway(resource: any): resource is SatispayGateway {\n\t\treturn resource.type && (resource.type === SatispayGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SatispayGatewayRel {\n\t\treturn super.relationshipOneToOne<SatispayGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SatispayGatewayRel[] {\n\t\treturn super.relationshipOneToMany<SatispayGatewayRel>(...ids)\n\t}\n\n\n\ttype(): SatispayGatewayType {\n\t\treturn SatispayGateways.TYPE\n\t}\n\n}\n\n\nexport default SatispayGateways\n\nexport type { SatispayGateway, SatispayGatewayCreate, SatispayGatewayUpdate, SatispayGatewayType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype SatispayPaymentType = 'satispay_payments'\ntype SatispayPaymentRel = ResourceRel & { type: SatispayPaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type SatispayPaymentSort = Pick<SatispayPayment, 'id' | 'flow' | 'status'> & ResourceSort\n// export type SatispayPaymentFilter = Pick<SatispayPayment, 'id' | 'flow' | 'status'> & ResourceFilter\n\n\ninterface SatispayPayment extends Resource {\n\t\n\treadonly type: SatispayPaymentType\n\n\tpayment_id?: string | null\n\tflow?: string | null\n\tstatus?: string | null\n\tredirect_url?: string | null\n\tpayment_url?: string | null\n\tintent_amount_cents: number\n\tintent_amount_float?: number | null\n\tformatted_intent_amount?: string | null\n\tpayment_response?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface SatispayPaymentCreate extends ResourceCreate {\n\t\n\tflow?: string | null\n\tredirect_url?: string | null\n\n\torder: OrderRel\n\n}\n\n\ninterface SatispayPaymentUpdate extends ResourceUpdate {\n\t\n\tredirect_url?: string | null\n\t_refresh?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass SatispayPayments extends ApiResource<SatispayPayment> {\n\n\tstatic readonly TYPE: SatispayPaymentType = 'satispay_payments' as const\n\n\tasync create(resource: SatispayPaymentCreate, params?: QueryParamsRetrieve<SatispayPayment>, options?: ResourcesConfig): Promise<SatispayPayment> {\n\t\treturn this.resources.create<SatispayPaymentCreate, SatispayPayment>({ ...resource, type: SatispayPayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SatispayPaymentUpdate, params?: QueryParamsRetrieve<SatispayPayment>, options?: ResourcesConfig): Promise<SatispayPayment> {\n\t\treturn this.resources.update<SatispayPaymentUpdate, SatispayPayment>({ ...resource, type: SatispayPayments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: SatispayPayments.TYPE } : id, options)\n\t}\n\n\tasync order(satispayPaymentId: string | SatispayPayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _satispayPaymentId = (satispayPaymentId as SatispayPayment).id || satispayPaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `satispay_payments/${_satispayPaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(satispayPaymentId: string | SatispayPayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _satispayPaymentId = (satispayPaymentId as SatispayPayment).id || satispayPaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `satispay_payments/${_satispayPaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(satispayPaymentId: string | SatispayPayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _satispayPaymentId = (satispayPaymentId as SatispayPayment).id || satispayPaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `satispay_payments/${_satispayPaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _refresh(id: string | SatispayPayment, params?: QueryParamsRetrieve<SatispayPayment>, options?: ResourcesConfig): Promise<SatispayPayment> {\n\t\treturn this.resources.update<SatispayPaymentUpdate, SatispayPayment>({ id: (typeof id === 'string')? id: id.id, type: SatispayPayments.TYPE, _refresh: true }, params, options)\n\t}\n\n\n\tisSatispayPayment(resource: any): resource is SatispayPayment {\n\t\treturn resource.type && (resource.type === SatispayPayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SatispayPaymentRel {\n\t\treturn super.relationshipOneToOne<SatispayPaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SatispayPaymentRel[] {\n\t\treturn super.relationshipOneToMany<SatispayPaymentRel>(...ids)\n\t}\n\n\n\ttype(): SatispayPaymentType {\n\t\treturn SatispayPayments.TYPE\n\t}\n\n}\n\n\nexport default SatispayPayments\n\nexport type { SatispayPayment, SatispayPaymentCreate, SatispayPaymentUpdate, SatispayPaymentType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { InventoryStockLocation, InventoryStockLocationType } from './inventory_stock_locations'\nimport type { StockLocation } from './stock_locations'\nimport type { Address, AddressType } from './addresses'\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { DeliveryLeadTime } from './delivery_lead_times'\nimport type { StockLineItem } from './stock_line_items'\nimport type { StockTransfer } from './stock_transfers'\nimport type { LineItem } from './line_items'\nimport type { CarrierAccount } from './carrier_accounts'\nimport type { Parcel } from './parcels'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype ShipmentType = 'shipments'\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype OrderRel = ResourceRel & { type: OrderType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype InventoryStockLocationRel = ResourceRel & { type: InventoryStockLocationType }\ntype AddressRel = ResourceRel & { type: AddressType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type ShipmentSort = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at'> & ResourceSort\n// export type ShipmentFilter = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at'> & ResourceFilter\n\n\ninterface Shipment extends Resource {\n\t\n\treadonly type: ShipmentType\n\n\tnumber?: string | null\n\tstatus: 'draft' | 'upcoming' | 'cancelled' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'shipped'\n\tcurrency_code?: string | null\n\tcost_amount_cents?: number | null\n\tcost_amount_float?: number | null\n\tformatted_cost_amount?: string | null\n\tskus_count?: number | null\n\tselected_rate_id?: string | null\n\trates?: Array<Record<string, any>> | null\n\tpurchase_error_code?: string | null\n\tpurchase_error_message?: string | null\n\tget_rates_errors?: Array<Record<string, any>> | null\n\tget_rates_started_at?: string | null\n\tget_rates_completed_at?: string | null\n\tpurchase_started_at?: string | null\n\tpurchase_completed_at?: string | null\n\tpurchase_failed_at?: string | null\n\ton_hold_at?: string | null\n\tpicking_at?: string | null\n\tpacking_at?: string | null\n\tready_to_ship_at?: string | null\n\tshipped_at?: string | null\n\n\torder?: Order | null\n\tshipping_category?: ShippingCategory | null\n\tinventory_stock_location?: InventoryStockLocation | null\n\tstock_location?: StockLocation | null\n\torigin_address?: Address | null\n\tshipping_address?: Address | null\n\tshipping_method?: ShippingMethod | null\n\tdelivery_lead_time?: DeliveryLeadTime | null\n\tstock_line_items?: StockLineItem[] | null\n\tstock_transfers?: StockTransfer[] | null\n\tline_items?: LineItem[] | null\n\tavailable_shipping_methods?: ShippingMethod[] | null\n\tcarrier_accounts?: CarrierAccount[] | null\n\tparcels?: Parcel[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShipmentCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\tshipping_category?: ShippingCategoryRel | null\n\tinventory_stock_location: InventoryStockLocationRel\n\tshipping_address?: AddressRel | null\n\tshipping_method?: ShippingMethodRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface ShipmentUpdate extends ResourceUpdate {\n\t\n\t_upcoming?: boolean | null\n\t_on_hold?: boolean | null\n\t_picking?: boolean | null\n\t_packing?: boolean | null\n\t_ready_to_ship?: boolean | null\n\t_ship?: boolean | null\n\t_reserve_stock?: boolean | null\n\t_release_stock?: boolean | null\n\t_decrement_stock?: boolean | null\n\t_get_rates?: boolean | null\n\tselected_rate_id?: string | null\n\t_purchase?: boolean | null\n\n\tshipping_category?: ShippingCategoryRel | null\n\tinventory_stock_location?: InventoryStockLocationRel | null\n\tshipping_address?: AddressRel | null\n\tshipping_method?: ShippingMethodRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Shipments extends ApiResource<Shipment> {\n\n\tstatic readonly TYPE: ShipmentType = 'shipments' as const\n\n\tasync create(resource: ShipmentCreate, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.create<ShipmentCreate, Shipment>({ ...resource, type: Shipments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShipmentUpdate, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ ...resource, type: Shipments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Shipments.TYPE } : id, options)\n\t}\n\n\tasync order(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `shipments/${_shipmentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync shipping_category(shipmentId: string | Shipment, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingCategory>({ type: 'shipping_categories' }, `shipments/${_shipmentId}/shipping_category`, params, options) as unknown as ShippingCategory\n\t}\n\n\tasync inventory_stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve<InventoryStockLocation>, options?: ResourcesConfig): Promise<InventoryStockLocation> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<InventoryStockLocation>({ type: 'inventory_stock_locations' }, `shipments/${_shipmentId}/inventory_stock_location`, params, options) as unknown as InventoryStockLocation\n\t}\n\n\tasync stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `shipments/${_shipmentId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync origin_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `shipments/${_shipmentId}/origin_address`, params, options) as unknown as Address\n\t}\n\n\tasync shipping_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `shipments/${_shipmentId}/shipping_address`, params, options) as unknown as Address\n\t}\n\n\tasync shipping_method(shipmentId: string | Shipment, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipments/${_shipmentId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync delivery_lead_time(shipmentId: string | Shipment, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<DeliveryLeadTime>({ type: 'delivery_lead_times' }, `shipments/${_shipmentId}/delivery_lead_time`, params, options) as unknown as DeliveryLeadTime\n\t}\n\n\tasync stock_line_items(shipmentId: string | Shipment, params?: QueryParamsList<StockLineItem>, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockLineItem>({ type: 'stock_line_items' }, `shipments/${_shipmentId}/stock_line_items`, params, options) as unknown as ListResponse<StockLineItem>\n\t}\n\n\tasync stock_transfers(shipmentId: string | Shipment, params?: QueryParamsList<StockTransfer>, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<StockTransfer>({ type: 'stock_transfers' }, `shipments/${_shipmentId}/stock_transfers`, params, options) as unknown as ListResponse<StockTransfer>\n\t}\n\n\tasync line_items(shipmentId: string | Shipment, params?: QueryParamsList<LineItem>, options?: ResourcesConfig): Promise<ListResponse<LineItem>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `shipments/${_shipmentId}/line_items`, params, options) as unknown as ListResponse<LineItem>\n\t}\n\n\tasync available_shipping_methods(shipmentId: string | Shipment, params?: QueryParamsList<ShippingMethod>, options?: ResourcesConfig): Promise<ListResponse<ShippingMethod>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipments/${_shipmentId}/available_shipping_methods`, params, options) as unknown as ListResponse<ShippingMethod>\n\t}\n\n\tasync carrier_accounts(shipmentId: string | Shipment, params?: QueryParamsList<CarrierAccount>, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<CarrierAccount>({ type: 'carrier_accounts' }, `shipments/${_shipmentId}/carrier_accounts`, params, options) as unknown as ListResponse<CarrierAccount>\n\t}\n\n\tasync parcels(shipmentId: string | Shipment, params?: QueryParamsList<Parcel>, options?: ResourcesConfig): Promise<ListResponse<Parcel>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Parcel>({ type: 'parcels' }, `shipments/${_shipmentId}/parcels`, params, options) as unknown as ListResponse<Parcel>\n\t}\n\n\tasync attachments(shipmentId: string | Shipment, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipments/${_shipmentId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(shipmentId: string | Shipment, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `shipments/${_shipmentId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(shipmentId: string | Shipment, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `shipments/${_shipmentId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(shipmentId: string | Shipment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shipmentId = (shipmentId as Shipment).id || shipmentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipments/${_shipmentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _upcoming(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _upcoming: true }, params, options)\n\t}\n\n\tasync _on_hold(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _on_hold: true }, params, options)\n\t}\n\n\tasync _picking(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _picking: true }, params, options)\n\t}\n\n\tasync _packing(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _packing: true }, params, options)\n\t}\n\n\tasync _ready_to_ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _ready_to_ship: true }, params, options)\n\t}\n\n\tasync _ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _ship: true }, params, options)\n\t}\n\n\tasync _reserve_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _reserve_stock: true }, params, options)\n\t}\n\n\tasync _release_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _release_stock: true }, params, options)\n\t}\n\n\tasync _decrement_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _decrement_stock: true }, params, options)\n\t}\n\n\tasync _get_rates(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _get_rates: true }, params, options)\n\t}\n\n\tasync _purchase(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\treturn this.resources.update<ShipmentUpdate, Shipment>({ id: (typeof id === 'string')? id: id.id, type: Shipments.TYPE, _purchase: true }, params, options)\n\t}\n\n\n\tisShipment(resource: any): resource is Shipment {\n\t\treturn resource.type && (resource.type === Shipments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShipmentRel {\n\t\treturn super.relationshipOneToOne<ShipmentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShipmentRel[] {\n\t\treturn super.relationshipOneToMany<ShipmentRel>(...ids)\n\t}\n\n\n\ttype(): ShipmentType {\n\t\treturn Shipments.TYPE\n\t}\n\n}\n\n\nexport default Shipments\n\nexport type { Shipment, ShipmentCreate, ShipmentUpdate, ShipmentType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Sku } from './skus'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingCategoryType = 'shipping_categories'\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\n\n\nexport type ShippingCategorySort = Pick<ShippingCategory, 'id' | 'name' | 'code'> & ResourceSort\n// export type ShippingCategoryFilter = Pick<ShippingCategory, 'id' | 'name' | 'code'> & ResourceFilter\n\n\ninterface ShippingCategory extends Resource {\n\t\n\treadonly type: ShippingCategoryType\n\n\tname: string\n\tcode?: string | null\n\n\tskus?: Sku[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingCategoryCreate extends ResourceCreate {\n\t\n\tname: string\n\tcode?: string | null\n\t\n}\n\n\ninterface ShippingCategoryUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tcode?: string | null\n\t\n}\n\n\nclass ShippingCategories extends ApiResource<ShippingCategory> {\n\n\tstatic readonly TYPE: ShippingCategoryType = 'shipping_categories' as const\n\n\tasync create(resource: ShippingCategoryCreate, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\treturn this.resources.create<ShippingCategoryCreate, ShippingCategory>({ ...resource, type: ShippingCategories.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingCategoryUpdate, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\treturn this.resources.update<ShippingCategoryUpdate, ShippingCategory>({ ...resource, type: ShippingCategories.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: ShippingCategories.TYPE } : id, options)\n\t}\n\n\tasync skus(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `shipping_categories/${_shippingCategoryId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync attachments(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_categories/${_shippingCategoryId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingCategoryId = (shippingCategoryId as ShippingCategory).id || shippingCategoryId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_categories/${_shippingCategoryId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingCategory(resource: any): resource is ShippingCategory {\n\t\treturn resource.type && (resource.type === ShippingCategories.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingCategoryRel {\n\t\treturn super.relationshipOneToOne<ShippingCategoryRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingCategoryRel[] {\n\t\treturn super.relationshipOneToMany<ShippingCategoryRel>(...ids)\n\t}\n\n\n\ttype(): ShippingCategoryType {\n\t\treturn ShippingCategories.TYPE\n\t}\n\n}\n\n\nexport default ShippingCategories\n\nexport type { ShippingCategory, ShippingCategoryCreate, ShippingCategoryUpdate, ShippingCategoryType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { ShippingMethod } from './shipping_methods'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingMethodTierType = 'shipping_method_tiers'\ntype ShippingMethodTierRel = ResourceRel & { type: ShippingMethodTierType }\n\n\nexport type ShippingMethodTierSort = Pick<ShippingMethodTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type ShippingMethodTierFilter = Pick<ShippingMethodTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface ShippingMethodTier extends Resource {\n\t\n\treadonly type: ShippingMethodTierType\n\n\tname: string\n\tup_to?: number | null\n\tprice_amount_cents: number\n\tprice_amount_float?: number | null\n\tformatted_price_amount?: string | null\n\n\tshipping_method?: ShippingMethod | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass ShippingMethodTiers extends ApiResource<ShippingMethodTier> {\n\n\tstatic readonly TYPE: ShippingMethodTierType = 'shipping_method_tiers' as const\n\n\tasync shipping_method(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shippingMethodTierId = (shippingMethodTierId as ShippingMethodTier).id || shippingMethodTierId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipping_method_tiers/${_shippingMethodTierId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync attachments(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingMethodTierId = (shippingMethodTierId as ShippingMethodTier).id || shippingMethodTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_method_tiers/${_shippingMethodTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingMethodTierId = (shippingMethodTierId as ShippingMethodTier).id || shippingMethodTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_method_tiers/${_shippingMethodTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingMethodTier(resource: any): resource is ShippingMethodTier {\n\t\treturn resource.type && (resource.type === ShippingMethodTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingMethodTierRel {\n\t\treturn super.relationshipOneToOne<ShippingMethodTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingMethodTierRel[] {\n\t\treturn super.relationshipOneToMany<ShippingMethodTierRel>(...ids)\n\t}\n\n\n\ttype(): ShippingMethodTierType {\n\t\treturn ShippingMethodTiers.TYPE\n\t}\n\n}\n\n\nexport default ShippingMethodTiers\n\nexport type { ShippingMethodTier, ShippingMethodTierType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { ShippingZone, ShippingZoneType } from './shipping_zones'\nimport type { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { DeliveryLeadTime } from './delivery_lead_times'\nimport type { ShippingMethodTier, ShippingMethodTierType } from './shipping_method_tiers'\nimport type { ShippingWeightTier } from './shipping_weight_tiers'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingMethodType = 'shipping_methods'\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype ShippingZoneRel = ResourceRel & { type: ShippingZoneType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype ShippingMethodTierRel = ResourceRel & { type: ShippingMethodTierType }\n\n\nexport type ShippingMethodSort = Pick<ShippingMethod, 'id' | 'name' | 'scheme' | 'currency_code' | 'price_amount_cents' | 'free_over_amount_cents' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceSort\n// export type ShippingMethodFilter = Pick<ShippingMethod, 'id' | 'name' | 'scheme' | 'currency_code' | 'price_amount_cents' | 'free_over_amount_cents' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceFilter\n\n\ninterface ShippingMethod extends Resource {\n\t\n\treadonly type: ShippingMethodType\n\n\tname: string\n\tscheme?: string | null\n\tcurrency_code?: string | null\n\texternal_prices_url?: string | null\n\tprice_amount_cents: number\n\tprice_amount_float?: number | null\n\tformatted_price_amount?: string | null\n\tfree_over_amount_cents?: number | null\n\tfree_over_amount_float?: number | null\n\tformatted_free_over_amount?: string | null\n\tuse_subtotal?: boolean | null\n\tprice_amount_for_shipment_cents?: number | null\n\tprice_amount_for_shipment_float?: number | null\n\tformatted_price_amount_for_shipment?: string | null\n\tmin_weight?: number | null\n\tmax_weight?: number | null\n\tunit_of_weight?: string | null\n\tdisabled_at?: string | null\n\tcircuit_state?: string | null\n\tcircuit_failure_count?: number | null\n\n\tmarket?: Market | null\n\tshipping_zone?: ShippingZone | null\n\tshipping_category?: ShippingCategory | null\n\tstock_location?: StockLocation | null\n\tdelivery_lead_time_for_shipment?: DeliveryLeadTime | null\n\tshipping_method_tiers?: ShippingMethodTier[] | null\n\tshipping_weight_tiers?: ShippingWeightTier[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingMethodCreate extends ResourceCreate {\n\t\n\tname: string\n\tscheme?: string | null\n\tcurrency_code?: string | null\n\texternal_prices_url?: string | null\n\tprice_amount_cents: number\n\tfree_over_amount_cents?: number | null\n\tuse_subtotal?: boolean | null\n\tmin_weight?: number | null\n\tmax_weight?: number | null\n\tunit_of_weight?: string | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\n\tmarket?: MarketRel | null\n\tshipping_zone?: ShippingZoneRel | null\n\tshipping_category?: ShippingCategoryRel | null\n\tstock_location?: StockLocationRel | null\n\tshipping_method_tiers?: ShippingMethodTierRel[] | null\n\n}\n\n\ninterface ShippingMethodUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tscheme?: string | null\n\tcurrency_code?: string | null\n\texternal_prices_url?: string | null\n\tprice_amount_cents?: number | null\n\tfree_over_amount_cents?: number | null\n\tuse_subtotal?: boolean | null\n\tmin_weight?: number | null\n\tmax_weight?: number | null\n\tunit_of_weight?: string | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\t_reset_circuit?: boolean | null\n\n\tmarket?: MarketRel | null\n\tshipping_zone?: ShippingZoneRel | null\n\tshipping_category?: ShippingCategoryRel | null\n\tstock_location?: StockLocationRel | null\n\tshipping_method_tiers?: ShippingMethodTierRel[] | null\n\n}\n\n\nclass ShippingMethods extends ApiResource<ShippingMethod> {\n\n\tstatic readonly TYPE: ShippingMethodType = 'shipping_methods' as const\n\n\tasync create(resource: ShippingMethodCreate, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.create<ShippingMethodCreate, ShippingMethod>({ ...resource, type: ShippingMethods.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingMethodUpdate, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ ...resource, type: ShippingMethods.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: ShippingMethods.TYPE } : id, options)\n\t}\n\n\tasync market(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `shipping_methods/${_shippingMethodId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync shipping_zone(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingZone>, options?: ResourcesConfig): Promise<ShippingZone> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingZone>({ type: 'shipping_zones' }, `shipping_methods/${_shippingMethodId}/shipping_zone`, params, options) as unknown as ShippingZone\n\t}\n\n\tasync shipping_category(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingCategory>({ type: 'shipping_categories' }, `shipping_methods/${_shippingMethodId}/shipping_category`, params, options) as unknown as ShippingCategory\n\t}\n\n\tasync stock_location(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `shipping_methods/${_shippingMethodId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync delivery_lead_time_for_shipment(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve<DeliveryLeadTime>, options?: ResourcesConfig): Promise<DeliveryLeadTime> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<DeliveryLeadTime>({ type: 'delivery_lead_times' }, `shipping_methods/${_shippingMethodId}/delivery_lead_time_for_shipment`, params, options) as unknown as DeliveryLeadTime\n\t}\n\n\tasync shipping_method_tiers(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<ShippingMethodTier>, options?: ResourcesConfig): Promise<ListResponse<ShippingMethodTier>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingMethodTier>({ type: 'shipping_method_tiers' }, `shipping_methods/${_shippingMethodId}/shipping_method_tiers`, params, options) as unknown as ListResponse<ShippingMethodTier>\n\t}\n\n\tasync shipping_weight_tiers(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<ShippingWeightTier>, options?: ResourcesConfig): Promise<ListResponse<ShippingWeightTier>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<ShippingWeightTier>({ type: 'shipping_weight_tiers' }, `shipping_methods/${_shippingMethodId}/shipping_weight_tiers`, params, options) as unknown as ListResponse<ShippingWeightTier>\n\t}\n\n\tasync attachments(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_methods/${_shippingMethodId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingMethodId: string | ShippingMethod, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingMethodId = (shippingMethodId as ShippingMethod).id || shippingMethodId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_methods/${_shippingMethodId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ id: (typeof id === 'string')? id: id.id, type: ShippingMethods.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ id: (typeof id === 'string')? id: id.id, type: ShippingMethods.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _reset_circuit(id: string | ShippingMethod, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\treturn this.resources.update<ShippingMethodUpdate, ShippingMethod>({ id: (typeof id === 'string')? id: id.id, type: ShippingMethods.TYPE, _reset_circuit: true }, params, options)\n\t}\n\n\n\tisShippingMethod(resource: any): resource is ShippingMethod {\n\t\treturn resource.type && (resource.type === ShippingMethods.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingMethodRel {\n\t\treturn super.relationshipOneToOne<ShippingMethodRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingMethodRel[] {\n\t\treturn super.relationshipOneToMany<ShippingMethodRel>(...ids)\n\t}\n\n\n\ttype(): ShippingMethodType {\n\t\treturn ShippingMethods.TYPE\n\t}\n\n}\n\n\nexport default ShippingMethods\n\nexport type { ShippingMethod, ShippingMethodCreate, ShippingMethodUpdate, ShippingMethodType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { ShippingMethod, ShippingMethodType } from './shipping_methods'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingWeightTierType = 'shipping_weight_tiers'\ntype ShippingWeightTierRel = ResourceRel & { type: ShippingWeightTierType }\ntype ShippingMethodRel = ResourceRel & { type: ShippingMethodType }\n\n\nexport type ShippingWeightTierSort = Pick<ShippingWeightTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceSort\n// export type ShippingWeightTierFilter = Pick<ShippingWeightTier, 'id' | 'name' | 'up_to' | 'price_amount_cents'> & ResourceFilter\n\n\ninterface ShippingWeightTier extends Resource {\n\t\n\treadonly type: ShippingWeightTierType\n\n\tname: string\n\tup_to?: number | null\n\tprice_amount_cents: number\n\tprice_amount_float?: number | null\n\tformatted_price_amount?: string | null\n\n\tshipping_method?: ShippingMethod | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingWeightTierCreate extends ResourceCreate {\n\t\n\tname: string\n\tup_to?: number | null\n\tprice_amount_cents: number\n\n\tshipping_method: ShippingMethodRel\n\n}\n\n\ninterface ShippingWeightTierUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tup_to?: number | null\n\tprice_amount_cents?: number | null\n\n\tshipping_method?: ShippingMethodRel | null\n\n}\n\n\nclass ShippingWeightTiers extends ApiResource<ShippingWeightTier> {\n\n\tstatic readonly TYPE: ShippingWeightTierType = 'shipping_weight_tiers' as const\n\n\tasync create(resource: ShippingWeightTierCreate, params?: QueryParamsRetrieve<ShippingWeightTier>, options?: ResourcesConfig): Promise<ShippingWeightTier> {\n\t\treturn this.resources.create<ShippingWeightTierCreate, ShippingWeightTier>({ ...resource, type: ShippingWeightTiers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingWeightTierUpdate, params?: QueryParamsRetrieve<ShippingWeightTier>, options?: ResourcesConfig): Promise<ShippingWeightTier> {\n\t\treturn this.resources.update<ShippingWeightTierUpdate, ShippingWeightTier>({ ...resource, type: ShippingWeightTiers.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: ShippingWeightTiers.TYPE } : id, options)\n\t}\n\n\tasync shipping_method(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsRetrieve<ShippingMethod>, options?: ResourcesConfig): Promise<ShippingMethod> {\n\t\tconst _shippingWeightTierId = (shippingWeightTierId as ShippingWeightTier).id || shippingWeightTierId as string\n\t\treturn this.resources.fetch<ShippingMethod>({ type: 'shipping_methods' }, `shipping_weight_tiers/${_shippingWeightTierId}/shipping_method`, params, options) as unknown as ShippingMethod\n\t}\n\n\tasync attachments(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingWeightTierId = (shippingWeightTierId as ShippingWeightTier).id || shippingWeightTierId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_weight_tiers/${_shippingWeightTierId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingWeightTierId = (shippingWeightTierId as ShippingWeightTier).id || shippingWeightTierId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_weight_tiers/${_shippingWeightTierId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingWeightTier(resource: any): resource is ShippingWeightTier {\n\t\treturn resource.type && (resource.type === ShippingWeightTiers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingWeightTierRel {\n\t\treturn super.relationshipOneToOne<ShippingWeightTierRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingWeightTierRel[] {\n\t\treturn super.relationshipOneToMany<ShippingWeightTierRel>(...ids)\n\t}\n\n\n\ttype(): ShippingWeightTierType {\n\t\treturn ShippingWeightTiers.TYPE\n\t}\n\n}\n\n\nexport default ShippingWeightTiers\n\nexport type { ShippingWeightTier, ShippingWeightTierCreate, ShippingWeightTierUpdate, ShippingWeightTierType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype ShippingZoneType = 'shipping_zones'\ntype ShippingZoneRel = ResourceRel & { type: ShippingZoneType }\n\n\nexport type ShippingZoneSort = Pick<ShippingZone, 'id' | 'name'> & ResourceSort\n// export type ShippingZoneFilter = Pick<ShippingZone, 'id' | 'name'> & ResourceFilter\n\n\ninterface ShippingZone extends Resource {\n\t\n\treadonly type: ShippingZoneType\n\n\tname: string\n\tcountry_code_regex?: string | null\n\tnot_country_code_regex?: string | null\n\tstate_code_regex?: string | null\n\tnot_state_code_regex?: string | null\n\tzip_code_regex?: string | null\n\tnot_zip_code_regex?: string | null\n\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface ShippingZoneCreate extends ResourceCreate {\n\t\n\tname: string\n\tcountry_code_regex?: string | null\n\tnot_country_code_regex?: string | null\n\tstate_code_regex?: string | null\n\tnot_state_code_regex?: string | null\n\tzip_code_regex?: string | null\n\tnot_zip_code_regex?: string | null\n\t\n}\n\n\ninterface ShippingZoneUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tcountry_code_regex?: string | null\n\tnot_country_code_regex?: string | null\n\tstate_code_regex?: string | null\n\tnot_state_code_regex?: string | null\n\tzip_code_regex?: string | null\n\tnot_zip_code_regex?: string | null\n\t\n}\n\n\nclass ShippingZones extends ApiResource<ShippingZone> {\n\n\tstatic readonly TYPE: ShippingZoneType = 'shipping_zones' as const\n\n\tasync create(resource: ShippingZoneCreate, params?: QueryParamsRetrieve<ShippingZone>, options?: ResourcesConfig): Promise<ShippingZone> {\n\t\treturn this.resources.create<ShippingZoneCreate, ShippingZone>({ ...resource, type: ShippingZones.TYPE }, params, options)\n\t}\n\n\tasync update(resource: ShippingZoneUpdate, params?: QueryParamsRetrieve<ShippingZone>, options?: ResourcesConfig): Promise<ShippingZone> {\n\t\treturn this.resources.update<ShippingZoneUpdate, ShippingZone>({ ...resource, type: ShippingZones.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: ShippingZones.TYPE } : id, options)\n\t}\n\n\tasync attachments(shippingZoneId: string | ShippingZone, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _shippingZoneId = (shippingZoneId as ShippingZone).id || shippingZoneId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `shipping_zones/${_shippingZoneId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(shippingZoneId: string | ShippingZone, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _shippingZoneId = (shippingZoneId as ShippingZone).id || shippingZoneId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `shipping_zones/${_shippingZoneId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisShippingZone(resource: any): resource is ShippingZone {\n\t\treturn resource.type && (resource.type === ShippingZones.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): ShippingZoneRel {\n\t\treturn super.relationshipOneToOne<ShippingZoneRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): ShippingZoneRel[] {\n\t\treturn super.relationshipOneToMany<ShippingZoneRel>(...ids)\n\t}\n\n\n\ttype(): ShippingZoneType {\n\t\treturn ShippingZones.TYPE\n\t}\n\n}\n\n\nexport default ShippingZones\n\nexport type { ShippingZone, ShippingZoneCreate, ShippingZoneUpdate, ShippingZoneType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Sku, SkuType } from './skus'\nimport type { Version } from './versions'\n\n\ntype SkuListItemType = 'sku_list_items'\ntype SkuListItemRel = ResourceRel & { type: SkuListItemType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type SkuListItemSort = Pick<SkuListItem, 'id' | 'position' | 'quantity'> & ResourceSort\n// export type SkuListItemFilter = Pick<SkuListItem, 'id' | 'position' | 'quantity'> & ResourceFilter\n\n\ninterface SkuListItem extends Resource {\n\t\n\treadonly type: SkuListItemType\n\n\tposition?: number | null\n\tsku_code?: string | null\n\tquantity?: number | null\n\n\tsku_list?: SkuList | null\n\tsku?: Sku | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface SkuListItemCreate extends ResourceCreate {\n\t\n\tposition?: number | null\n\tsku_code?: string | null\n\tquantity?: number | null\n\n\tsku_list: SkuListRel\n\tsku: SkuRel\n\n}\n\n\ninterface SkuListItemUpdate extends ResourceUpdate {\n\t\n\tposition?: number | null\n\tsku_code?: string | null\n\tquantity?: number | null\n\t\n}\n\n\nclass SkuListItems extends ApiResource<SkuListItem> {\n\n\tstatic readonly TYPE: SkuListItemType = 'sku_list_items' as const\n\n\tasync create(resource: SkuListItemCreate, params?: QueryParamsRetrieve<SkuListItem>, options?: ResourcesConfig): Promise<SkuListItem> {\n\t\treturn this.resources.create<SkuListItemCreate, SkuListItem>({ ...resource, type: SkuListItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuListItemUpdate, params?: QueryParamsRetrieve<SkuListItem>, options?: ResourcesConfig): Promise<SkuListItem> {\n\t\treturn this.resources.update<SkuListItemUpdate, SkuListItem>({ ...resource, type: SkuListItems.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: SkuListItems.TYPE } : id, options)\n\t}\n\n\tasync sku_list(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `sku_list_items/${_skuListItemId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync sku(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `sku_list_items/${_skuListItemId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync versions(skuListItemId: string | SkuListItem, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuListItemId = (skuListItemId as SkuListItem).id || skuListItemId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `sku_list_items/${_skuListItemId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisSkuListItem(resource: any): resource is SkuListItem {\n\t\treturn resource.type && (resource.type === SkuListItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuListItemRel {\n\t\treturn super.relationshipOneToOne<SkuListItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuListItemRel[] {\n\t\treturn super.relationshipOneToMany<SkuListItemRel>(...ids)\n\t}\n\n\n\ttype(): SkuListItemType {\n\t\treturn SkuListItems.TYPE\n\t}\n\n}\n\n\nexport default SkuListItems\n\nexport type { SkuListItem, SkuListItemCreate, SkuListItemUpdate, SkuListItemType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PercentageDiscountPromotion, PercentageDiscountPromotionType } from './percentage_discount_promotions'\nimport type { FreeShippingPromotion, FreeShippingPromotionType } from './free_shipping_promotions'\nimport type { BuyXPayYPromotion, BuyXPayYPromotionType } from './buy_x_pay_y_promotions'\nimport type { FreeGiftPromotion, FreeGiftPromotionType } from './free_gift_promotions'\nimport type { FixedPricePromotion, FixedPricePromotionType } from './fixed_price_promotions'\nimport type { ExternalPromotion, ExternalPromotionType } from './external_promotions'\nimport type { FixedAmountPromotion, FixedAmountPromotionType } from './fixed_amount_promotions'\nimport type { Version } from './versions'\nimport type { SkuList, SkuListType } from './sku_lists'\nimport type { Sku } from './skus'\n\n\ntype SkuListPromotionRuleType = 'sku_list_promotion_rules'\ntype SkuListPromotionRuleRel = ResourceRel & { type: SkuListPromotionRuleType }\ntype PercentageDiscountPromotionRel = ResourceRel & { type: PercentageDiscountPromotionType }\ntype FreeShippingPromotionRel = ResourceRel & { type: FreeShippingPromotionType }\ntype BuyXPayYPromotionRel = ResourceRel & { type: BuyXPayYPromotionType }\ntype FreeGiftPromotionRel = ResourceRel & { type: FreeGiftPromotionType }\ntype FixedPricePromotionRel = ResourceRel & { type: FixedPricePromotionType }\ntype ExternalPromotionRel = ResourceRel & { type: ExternalPromotionType }\ntype FixedAmountPromotionRel = ResourceRel & { type: FixedAmountPromotionType }\ntype SkuListRel = ResourceRel & { type: SkuListType }\n\n\nexport type SkuListPromotionRuleSort = Pick<SkuListPromotionRule, 'id'> & ResourceSort\n// export type SkuListPromotionRuleFilter = Pick<SkuListPromotionRule, 'id'> & ResourceFilter\n\n\ninterface SkuListPromotionRule extends Resource {\n\t\n\treadonly type: SkuListPromotionRuleType\n\n\tall_skus?: boolean | null\n\tmin_quantity?: number | null\n\n\tpromotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | null\n\tversions?: Version[] | null\n\tsku_list?: SkuList | null\n\tskus?: Sku[] | null\n\n}\n\n\ninterface SkuListPromotionRuleCreate extends ResourceCreate {\n\t\n\tall_skus?: boolean | null\n\tmin_quantity?: number | null\n\n\tpromotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel\n\tsku_list?: SkuListRel | null\n\n}\n\n\ninterface SkuListPromotionRuleUpdate extends ResourceUpdate {\n\t\n\tall_skus?: boolean | null\n\tmin_quantity?: number | null\n\n\tpromotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | null\n\tsku_list?: SkuListRel | null\n\n}\n\n\nclass SkuListPromotionRules extends ApiResource<SkuListPromotionRule> {\n\n\tstatic readonly TYPE: SkuListPromotionRuleType = 'sku_list_promotion_rules' as const\n\n\tasync create(resource: SkuListPromotionRuleCreate, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\treturn this.resources.create<SkuListPromotionRuleCreate, SkuListPromotionRule>({ ...resource, type: SkuListPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuListPromotionRuleUpdate, params?: QueryParamsRetrieve<SkuListPromotionRule>, options?: ResourcesConfig): Promise<SkuListPromotionRule> {\n\t\treturn this.resources.update<SkuListPromotionRuleUpdate, SkuListPromotionRule>({ ...resource, type: SkuListPromotionRules.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: SkuListPromotionRules.TYPE } : id, options)\n\t}\n\n\tasync versions(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuListPromotionRuleId = (skuListPromotionRuleId as SkuListPromotionRule).id || skuListPromotionRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync sku_list(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\tconst _skuListPromotionRuleId = (skuListPromotionRuleId as SkuListPromotionRule).id || skuListPromotionRuleId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/sku_list`, params, options) as unknown as SkuList\n\t}\n\n\tasync skus(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _skuListPromotionRuleId = (skuListPromotionRuleId as SkuListPromotionRule).id || skuListPromotionRuleId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\n\tisSkuListPromotionRule(resource: any): resource is SkuListPromotionRule {\n\t\treturn resource.type && (resource.type === SkuListPromotionRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuListPromotionRuleRel {\n\t\treturn super.relationshipOneToOne<SkuListPromotionRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuListPromotionRuleRel[] {\n\t\treturn super.relationshipOneToMany<SkuListPromotionRuleRel>(...ids)\n\t}\n\n\n\ttype(): SkuListPromotionRuleType {\n\t\treturn SkuListPromotionRules.TYPE\n\t}\n\n}\n\n\nexport default SkuListPromotionRules\n\nexport type { SkuListPromotionRule, SkuListPromotionRuleCreate, SkuListPromotionRuleUpdate, SkuListPromotionRuleType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Customer, CustomerType } from './customers'\nimport type { Sku } from './skus'\nimport type { SkuListItem } from './sku_list_items'\nimport type { Bundle } from './bundles'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype SkuListType = 'sku_lists'\ntype SkuListRel = ResourceRel & { type: SkuListType }\ntype CustomerRel = ResourceRel & { type: CustomerType }\n\n\nexport type SkuListSort = Pick<SkuList, 'id' | 'name' | 'slug' | 'manual'> & ResourceSort\n// export type SkuListFilter = Pick<SkuList, 'id' | 'name' | 'slug' | 'description' | 'image_url' | 'manual'> & ResourceFilter\n\n\ninterface SkuList extends Resource {\n\t\n\treadonly type: SkuListType\n\n\tname: string\n\tslug: string\n\tdescription?: string | null\n\timage_url?: string | null\n\tmanual?: boolean | null\n\tsku_code_regex?: string | null\n\n\tcustomer?: Customer | null\n\tskus?: Sku[] | null\n\tsku_list_items?: SkuListItem[] | null\n\tbundles?: Bundle[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface SkuListCreate extends ResourceCreate {\n\t\n\tname: string\n\tdescription?: string | null\n\timage_url?: string | null\n\tmanual?: boolean | null\n\tsku_code_regex?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\ninterface SkuListUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tdescription?: string | null\n\timage_url?: string | null\n\tmanual?: boolean | null\n\tsku_code_regex?: string | null\n\n\tcustomer?: CustomerRel | null\n\n}\n\n\nclass SkuLists extends ApiResource<SkuList> {\n\n\tstatic readonly TYPE: SkuListType = 'sku_lists' as const\n\n\tasync create(resource: SkuListCreate, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\treturn this.resources.create<SkuListCreate, SkuList>({ ...resource, type: SkuLists.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuListUpdate, params?: QueryParamsRetrieve<SkuList>, options?: ResourcesConfig): Promise<SkuList> {\n\t\treturn this.resources.update<SkuListUpdate, SkuList>({ ...resource, type: SkuLists.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: SkuLists.TYPE } : id, options)\n\t}\n\n\tasync customer(skuListId: string | SkuList, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `sku_lists/${_skuListId}/customer`, params, options) as unknown as Customer\n\t}\n\n\tasync skus(skuListId: string | SkuList, params?: QueryParamsList<Sku>, options?: ResourcesConfig): Promise<ListResponse<Sku>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `sku_lists/${_skuListId}/skus`, params, options) as unknown as ListResponse<Sku>\n\t}\n\n\tasync sku_list_items(skuListId: string | SkuList, params?: QueryParamsList<SkuListItem>, options?: ResourcesConfig): Promise<ListResponse<SkuListItem>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<SkuListItem>({ type: 'sku_list_items' }, `sku_lists/${_skuListId}/sku_list_items`, params, options) as unknown as ListResponse<SkuListItem>\n\t}\n\n\tasync bundles(skuListId: string | SkuList, params?: QueryParamsList<Bundle>, options?: ResourcesConfig): Promise<ListResponse<Bundle>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Bundle>({ type: 'bundles' }, `sku_lists/${_skuListId}/bundles`, params, options) as unknown as ListResponse<Bundle>\n\t}\n\n\tasync attachments(skuListId: string | SkuList, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `sku_lists/${_skuListId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(skuListId: string | SkuList, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuListId = (skuListId as SkuList).id || skuListId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `sku_lists/${_skuListId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisSkuList(resource: any): resource is SkuList {\n\t\treturn resource.type && (resource.type === SkuLists.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuListRel {\n\t\treturn super.relationshipOneToOne<SkuListRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuListRel[] {\n\t\treturn super.relationshipOneToMany<SkuListRel>(...ids)\n\t}\n\n\n\ttype(): SkuListType {\n\t\treturn SkuLists.TYPE\n\t}\n\n}\n\n\nexport default SkuLists\n\nexport type { SkuList, SkuListCreate, SkuListUpdate, SkuListType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market, MarketType } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype SkuOptionType = 'sku_options'\ntype SkuOptionRel = ResourceRel & { type: SkuOptionType }\ntype MarketRel = ResourceRel & { type: MarketType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type SkuOptionSort = Pick<SkuOption, 'id' | 'name' | 'currency_code' | 'price_amount_cents' | 'delay_hours' | 'delay_days'> & ResourceSort\n// export type SkuOptionFilter = Pick<SkuOption, 'id' | 'name' | 'currency_code' | 'description' | 'price_amount_cents' | 'delay_hours' | 'delay_days'> & ResourceFilter\n\n\ninterface SkuOption extends Resource {\n\t\n\treadonly type: SkuOptionType\n\n\tname: string\n\tcurrency_code?: string | null\n\tdescription?: string | null\n\tprice_amount_cents?: number | null\n\tprice_amount_float?: number | null\n\tformatted_price_amount?: string | null\n\tdelay_hours?: number | null\n\tdelay_days?: number | null\n\tsku_code_regex?: string | null\n\n\tmarket?: Market | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface SkuOptionCreate extends ResourceCreate {\n\t\n\tname: string\n\tcurrency_code?: string | null\n\tdescription?: string | null\n\tprice_amount_cents?: number | null\n\tdelay_hours?: number | null\n\tsku_code_regex?: string | null\n\n\tmarket?: MarketRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface SkuOptionUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tcurrency_code?: string | null\n\tdescription?: string | null\n\tprice_amount_cents?: number | null\n\tdelay_hours?: number | null\n\tsku_code_regex?: string | null\n\n\tmarket?: MarketRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass SkuOptions extends ApiResource<SkuOption> {\n\n\tstatic readonly TYPE: SkuOptionType = 'sku_options' as const\n\n\tasync create(resource: SkuOptionCreate, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\treturn this.resources.create<SkuOptionCreate, SkuOption>({ ...resource, type: SkuOptions.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuOptionUpdate, params?: QueryParamsRetrieve<SkuOption>, options?: ResourcesConfig): Promise<SkuOption> {\n\t\treturn this.resources.update<SkuOptionUpdate, SkuOption>({ ...resource, type: SkuOptions.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: SkuOptions.TYPE } : id, options)\n\t}\n\n\tasync market(skuOptionId: string | SkuOption, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `sku_options/${_skuOptionId}/market`, params, options) as unknown as Market\n\t}\n\n\tasync attachments(skuOptionId: string | SkuOption, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `sku_options/${_skuOptionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(skuOptionId: string | SkuOption, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `sku_options/${_skuOptionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(skuOptionId: string | SkuOption, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `sku_options/${_skuOptionId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(skuOptionId: string | SkuOption, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuOptionId = (skuOptionId as SkuOption).id || skuOptionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `sku_options/${_skuOptionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisSkuOption(resource: any): resource is SkuOption {\n\t\treturn resource.type && (resource.type === SkuOptions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuOptionRel {\n\t\treturn super.relationshipOneToOne<SkuOptionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuOptionRel[] {\n\t\treturn super.relationshipOneToMany<SkuOptionRel>(...ids)\n\t}\n\n\n\ttype(): SkuOptionType {\n\t\treturn SkuOptions.TYPE\n\t}\n\n}\n\n\nexport default SkuOptions\n\nexport type { SkuOption, SkuOptionCreate, SkuOptionUpdate, SkuOptionType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { ShippingCategory, ShippingCategoryType } from './shipping_categories'\nimport type { Price } from './prices'\nimport type { StockItem } from './stock_items'\nimport type { StockReservation } from './stock_reservations'\nimport type { DeliveryLeadTime } from './delivery_lead_times'\nimport type { SkuOption } from './sku_options'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Version } from './versions'\n\n\ntype SkuType = 'skus'\ntype SkuRel = ResourceRel & { type: SkuType }\ntype ShippingCategoryRel = ResourceRel & { type: ShippingCategoryType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type SkuSort = Pick<Sku, 'id' | 'code' | 'name' | 'do_not_ship' | 'do_not_track'> & ResourceSort\n// export type SkuFilter = Pick<Sku, 'id' | 'code' | 'name' | 'description' | 'image_url' | 'do_not_ship' | 'do_not_track'> & ResourceFilter\n\n\ninterface Sku extends Resource {\n\t\n\treadonly type: SkuType\n\n\tcode: string\n\tname: string\n\tdescription?: string | null\n\timage_url?: string | null\n\tpieces_per_pack?: number | null\n\tweight?: number | null\n\tunit_of_weight?: 'gr' | 'lb' | 'oz' | null\n\ths_tariff_number?: string | null\n\tdo_not_ship?: boolean | null\n\tdo_not_track?: boolean | null\n\tinventory?: Record<string, any> | null\n\n\tshipping_category?: ShippingCategory | null\n\tprices?: Price[] | null\n\tstock_items?: StockItem[] | null\n\tstock_reservations?: StockReservation[] | null\n\tdelivery_lead_times?: DeliveryLeadTime[] | null\n\tsku_options?: SkuOption[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface SkuCreate extends ResourceCreate {\n\t\n\tcode: string\n\tname: string\n\tdescription?: string | null\n\timage_url?: string | null\n\tpieces_per_pack?: number | null\n\tweight?: number | null\n\tunit_of_weight?: 'gr' | 'lb' | 'oz' | null\n\ths_tariff_number?: string | null\n\tdo_not_ship?: boolean | null\n\tdo_not_track?: boolean | null\n\n\tshipping_category: ShippingCategoryRel\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface SkuUpdate extends ResourceUpdate {\n\t\n\tcode?: string | null\n\tname?: string | null\n\tdescription?: string | null\n\timage_url?: string | null\n\tpieces_per_pack?: number | null\n\tweight?: number | null\n\tunit_of_weight?: 'gr' | 'lb' | 'oz' | null\n\ths_tariff_number?: string | null\n\tdo_not_ship?: boolean | null\n\tdo_not_track?: boolean | null\n\n\tshipping_category?: ShippingCategoryRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Skus extends ApiResource<Sku> {\n\n\tstatic readonly TYPE: SkuType = 'skus' as const\n\n\tasync create(resource: SkuCreate, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\treturn this.resources.create<SkuCreate, Sku>({ ...resource, type: Skus.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SkuUpdate, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\treturn this.resources.update<SkuUpdate, Sku>({ ...resource, type: Skus.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Skus.TYPE } : id, options)\n\t}\n\n\tasync shipping_category(skuId: string | Sku, params?: QueryParamsRetrieve<ShippingCategory>, options?: ResourcesConfig): Promise<ShippingCategory> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<ShippingCategory>({ type: 'shipping_categories' }, `skus/${_skuId}/shipping_category`, params, options) as unknown as ShippingCategory\n\t}\n\n\tasync prices(skuId: string | Sku, params?: QueryParamsList<Price>, options?: ResourcesConfig): Promise<ListResponse<Price>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Price>({ type: 'prices' }, `skus/${_skuId}/prices`, params, options) as unknown as ListResponse<Price>\n\t}\n\n\tasync stock_items(skuId: string | Sku, params?: QueryParamsList<StockItem>, options?: ResourcesConfig): Promise<ListResponse<StockItem>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<StockItem>({ type: 'stock_items' }, `skus/${_skuId}/stock_items`, params, options) as unknown as ListResponse<StockItem>\n\t}\n\n\tasync stock_reservations(skuId: string | Sku, params?: QueryParamsList<StockReservation>, options?: ResourcesConfig): Promise<ListResponse<StockReservation>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `skus/${_skuId}/stock_reservations`, params, options) as unknown as ListResponse<StockReservation>\n\t}\n\n\tasync delivery_lead_times(skuId: string | Sku, params?: QueryParamsList<DeliveryLeadTime>, options?: ResourcesConfig): Promise<ListResponse<DeliveryLeadTime>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<DeliveryLeadTime>({ type: 'delivery_lead_times' }, `skus/${_skuId}/delivery_lead_times`, params, options) as unknown as ListResponse<DeliveryLeadTime>\n\t}\n\n\tasync sku_options(skuId: string | Sku, params?: QueryParamsList<SkuOption>, options?: ResourcesConfig): Promise<ListResponse<SkuOption>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<SkuOption>({ type: 'sku_options' }, `skus/${_skuId}/sku_options`, params, options) as unknown as ListResponse<SkuOption>\n\t}\n\n\tasync attachments(skuId: string | Sku, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `skus/${_skuId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(skuId: string | Sku, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `skus/${_skuId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(skuId: string | Sku, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `skus/${_skuId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync versions(skuId: string | Sku, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _skuId = (skuId as Sku).id || skuId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `skus/${_skuId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisSku(resource: any): resource is Sku {\n\t\treturn resource.type && (resource.type === Skus.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SkuRel {\n\t\treturn super.relationshipOneToOne<SkuRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SkuRel[] {\n\t\treturn super.relationshipOneToMany<SkuRel>(...ids)\n\t}\n\n\n\ttype(): SkuType {\n\t\treturn Skus.TYPE\n\t}\n\n}\n\n\nexport default Skus\n\nexport type { Sku, SkuCreate, SkuUpdate, SkuType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { Sku, SkuType } from './skus'\nimport type { ReservedStock } from './reserved_stocks'\nimport type { StockReservation } from './stock_reservations'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype StockItemType = 'stock_items'\ntype StockItemRel = ResourceRel & { type: StockItemType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type StockItemSort = Pick<StockItem, 'id' | 'quantity'> & ResourceSort\n// export type StockItemFilter = Pick<StockItem, 'id' | 'quantity'> & ResourceFilter\n\n\ninterface StockItem extends Resource {\n\t\n\treadonly type: StockItemType\n\n\tsku_code?: string | null\n\tquantity: number\n\n\tstock_location?: StockLocation | null\n\tsku?: Sku | null\n\treserved_stock?: ReservedStock | null\n\tstock_reservations?: StockReservation[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StockItemCreate extends ResourceCreate {\n\t\n\tsku_code?: string | null\n\tquantity: number\n\n\tstock_location: StockLocationRel\n\tsku?: SkuRel | null\n\n}\n\n\ninterface StockItemUpdate extends ResourceUpdate {\n\t\n\tsku_code?: string | null\n\tquantity?: number | null\n\n\tstock_location?: StockLocationRel | null\n\tsku?: SkuRel | null\n\n}\n\n\nclass StockItems extends ApiResource<StockItem> {\n\n\tstatic readonly TYPE: StockItemType = 'stock_items' as const\n\n\tasync create(resource: StockItemCreate, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\treturn this.resources.create<StockItemCreate, StockItem>({ ...resource, type: StockItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StockItemUpdate, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\treturn this.resources.update<StockItemUpdate, StockItem>({ ...resource, type: StockItems.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StockItems.TYPE } : id, options)\n\t}\n\n\tasync stock_location(stockItemId: string | StockItem, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `stock_items/${_stockItemId}/stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync sku(stockItemId: string | StockItem, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `stock_items/${_stockItemId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync reserved_stock(stockItemId: string | StockItem, params?: QueryParamsRetrieve<ReservedStock>, options?: ResourcesConfig): Promise<ReservedStock> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<ReservedStock>({ type: 'reserved_stocks' }, `stock_items/${_stockItemId}/reserved_stock`, params, options) as unknown as ReservedStock\n\t}\n\n\tasync stock_reservations(stockItemId: string | StockItem, params?: QueryParamsList<StockReservation>, options?: ResourcesConfig): Promise<ListResponse<StockReservation>> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<StockReservation>({ type: 'stock_reservations' }, `stock_items/${_stockItemId}/stock_reservations`, params, options) as unknown as ListResponse<StockReservation>\n\t}\n\n\tasync attachments(stockItemId: string | StockItem, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `stock_items/${_stockItemId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(stockItemId: string | StockItem, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stockItemId = (stockItemId as StockItem).id || stockItemId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stock_items/${_stockItemId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisStockItem(resource: any): resource is StockItem {\n\t\treturn resource.type && (resource.type === StockItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StockItemRel {\n\t\treturn super.relationshipOneToOne<StockItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StockItemRel[] {\n\t\treturn super.relationshipOneToMany<StockItemRel>(...ids)\n\t}\n\n\n\ttype(): StockItemType {\n\t\treturn StockItems.TYPE\n\t}\n\n}\n\n\nexport default StockItems\n\nexport type { StockItem, StockItemCreate, StockItemUpdate, StockItemType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Shipment, ShipmentType } from './shipments'\nimport type { LineItem, LineItemType } from './line_items'\nimport type { StockItem, StockItemType } from './stock_items'\nimport type { Sku, SkuType } from './skus'\nimport type { Version } from './versions'\n\n\ntype StockLineItemType = 'stock_line_items'\ntype StockLineItemRel = ResourceRel & { type: StockLineItemType }\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype LineItemRel = ResourceRel & { type: LineItemType }\ntype StockItemRel = ResourceRel & { type: StockItemType }\ntype SkuRel = ResourceRel & { type: SkuType }\n\n\nexport type StockLineItemSort = Pick<StockLineItem, 'id' | 'quantity'> & ResourceSort\n// export type StockLineItemFilter = Pick<StockLineItem, 'id' | 'sku_code' | 'quantity'> & ResourceFilter\n\n\ninterface StockLineItem extends Resource {\n\t\n\treadonly type: StockLineItemType\n\n\tsku_code?: string | null\n\tbundle_code?: string | null\n\tquantity: number\n\n\tshipment?: Shipment | null\n\tline_item?: LineItem | null\n\tstock_item?: StockItem | null\n\tsku?: Sku | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StockLineItemCreate extends ResourceCreate {\n\t\n\tsku_code?: string | null\n\tquantity: number\n\n\tshipment?: ShipmentRel | null\n\tline_item?: LineItemRel | null\n\tstock_item?: StockItemRel | null\n\tsku?: SkuRel | null\n\n}\n\n\ninterface StockLineItemUpdate extends ResourceUpdate {\n\t\n\tsku_code?: string | null\n\tquantity?: number | null\n\t_reserve_stock?: boolean | null\n\t_release_stock?: boolean | null\n\t_decrement_stock?: boolean | null\n\n\tshipment?: ShipmentRel | null\n\tline_item?: LineItemRel | null\n\tstock_item?: StockItemRel | null\n\tsku?: SkuRel | null\n\n}\n\n\nclass StockLineItems extends ApiResource<StockLineItem> {\n\n\tstatic readonly TYPE: StockLineItemType = 'stock_line_items' as const\n\n\tasync create(resource: StockLineItemCreate, params?: QueryParamsRetrieve<StockLineItem>, options?: ResourcesConfig): Promise<StockLineItem> {\n\t\treturn this.resources.create<StockLineItemCreate, StockLineItem>({ ...resource, type: StockLineItems.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StockLineItemUpdate, params?: QueryParamsRetrieve<StockLineItem>, options?: ResourcesConfig): Promise<StockLineItem> {\n\t\treturn this.resources.update<StockLineItemUpdate, StockLineItem>({ ...resource, type: StockLineItems.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StockLineItems.TYPE } : id, options)\n\t}\n\n\tasync shipment(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\tconst _stockLineItemId = (stockLineItemId as StockLineItem).id || stockLineItemId as string\n\t\treturn this.resources.fetch<Shipment>({ type: 'shipments' }, `stock_line_items/${_stockLineItemId}/shipment`, params, options) as unknown as Shipment\n\t}\n\n\tasync line_item(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\tconst _stockLineItemId = (stockLineItemId as StockLineItem).id || stockLineItemId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `stock_line_items/${_stockLineItemId}/line_item`, params, options) as unknown as LineItem\n\t}\n\n\tasync stock_item(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\tconst _stockLineItemId = (stockLineItemId as StockLineItem).id || stockLineItemId as string\n\t\treturn this.resources.fetch<StockItem>({ type: 'stock_items' }, `stock_line_items/${_stockLineItemId}/stock_item`, params, options) as unknown as StockItem\n\t}\n\n\tasync sku(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _stockLineItemId = (stockLineItemId as StockLineItem).id || stockLineItemId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `stock_line_items/${_stockLineItemId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync versions(stockLineItemId: string | StockLineItem, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stockLineItemId = (stockLineItemId as StockLineItem).id || stockLineItemId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stock_line_items/${_stockLineItemId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _reserve_stock(id: string | StockLineItem, params?: QueryParamsRetrieve<StockLineItem>, options?: ResourcesConfig): Promise<StockLineItem> {\n\t\treturn this.resources.update<StockLineItemUpdate, StockLineItem>({ id: (typeof id === 'string')? id: id.id, type: StockLineItems.TYPE, _reserve_stock: true }, params, options)\n\t}\n\n\tasync _release_stock(id: string | StockLineItem, params?: QueryParamsRetrieve<StockLineItem>, options?: ResourcesConfig): Promise<StockLineItem> {\n\t\treturn this.resources.update<StockLineItemUpdate, StockLineItem>({ id: (typeof id === 'string')? id: id.id, type: StockLineItems.TYPE, _release_stock: true }, params, options)\n\t}\n\n\tasync _decrement_stock(id: string | StockLineItem, params?: QueryParamsRetrieve<StockLineItem>, options?: ResourcesConfig): Promise<StockLineItem> {\n\t\treturn this.resources.update<StockLineItemUpdate, StockLineItem>({ id: (typeof id === 'string')? id: id.id, type: StockLineItems.TYPE, _decrement_stock: true }, params, options)\n\t}\n\n\n\tisStockLineItem(resource: any): resource is StockLineItem {\n\t\treturn resource.type && (resource.type === StockLineItems.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StockLineItemRel {\n\t\treturn super.relationshipOneToOne<StockLineItemRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StockLineItemRel[] {\n\t\treturn super.relationshipOneToMany<StockLineItemRel>(...ids)\n\t}\n\n\n\ttype(): StockLineItemType {\n\t\treturn StockLineItems.TYPE\n\t}\n\n}\n\n\nexport default StockLineItems\n\nexport type { StockLineItem, StockLineItemCreate, StockLineItemUpdate, StockLineItemType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Address, AddressType } from './addresses'\nimport type { InventoryStockLocation } from './inventory_stock_locations'\nimport type { InventoryReturnLocation } from './inventory_return_locations'\nimport type { StockItem } from './stock_items'\nimport type { StockTransfer } from './stock_transfers'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype StockLocationType = 'stock_locations'\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype AddressRel = ResourceRel & { type: AddressType }\n\n\nexport type StockLocationSort = Pick<StockLocation, 'id' | 'name' | 'code' | 'label_format' | 'suppress_etd'> & ResourceSort\n// export type StockLocationFilter = Pick<StockLocation, 'id' | 'name' | 'code' | 'label_format' | 'suppress_etd'> & ResourceFilter\n\n\ninterface StockLocation extends Resource {\n\t\n\treadonly type: StockLocationType\n\n\tnumber?: number | null\n\tname: string\n\tcode?: string | null\n\tlabel_format?: string | null\n\tsuppress_etd?: boolean | null\n\n\taddress?: Address | null\n\tinventory_stock_locations?: InventoryStockLocation[] | null\n\tinventory_return_locations?: InventoryReturnLocation[] | null\n\tstock_items?: StockItem[] | null\n\tstock_transfers?: StockTransfer[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StockLocationCreate extends ResourceCreate {\n\t\n\tname: string\n\tcode?: string | null\n\tlabel_format?: string | null\n\tsuppress_etd?: boolean | null\n\n\taddress: AddressRel\n\n}\n\n\ninterface StockLocationUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tcode?: string | null\n\tlabel_format?: string | null\n\tsuppress_etd?: boolean | null\n\n\taddress?: AddressRel | null\n\n}\n\n\nclass StockLocations extends ApiResource<StockLocation> {\n\n\tstatic readonly TYPE: StockLocationType = 'stock_locations' as const\n\n\tasync create(resource: StockLocationCreate, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\treturn this.resources.create<StockLocationCreate, StockLocation>({ ...resource, type: StockLocations.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StockLocationUpdate, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\treturn this.resources.update<StockLocationUpdate, StockLocation>({ ...resource, type: StockLocations.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StockLocations.TYPE } : id, options)\n\t}\n\n\tasync address(stockLocationId: string | StockLocation, params?: QueryParamsRetrieve<Address>, options?: ResourcesConfig): Promise<Address> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<Address>({ type: 'addresses' }, `stock_locations/${_stockLocationId}/address`, params, options) as unknown as Address\n\t}\n\n\tasync inventory_stock_locations(stockLocationId: string | StockLocation, params?: QueryParamsList<InventoryStockLocation>, options?: ResourcesConfig): Promise<ListResponse<InventoryStockLocation>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<InventoryStockLocation>({ type: 'inventory_stock_locations' }, `stock_locations/${_stockLocationId}/inventory_stock_locations`, params, options) as unknown as ListResponse<InventoryStockLocation>\n\t}\n\n\tasync inventory_return_locations(stockLocationId: string | StockLocation, params?: QueryParamsList<InventoryReturnLocation>, options?: ResourcesConfig): Promise<ListResponse<InventoryReturnLocation>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<InventoryReturnLocation>({ type: 'inventory_return_locations' }, `stock_locations/${_stockLocationId}/inventory_return_locations`, params, options) as unknown as ListResponse<InventoryReturnLocation>\n\t}\n\n\tasync stock_items(stockLocationId: string | StockLocation, params?: QueryParamsList<StockItem>, options?: ResourcesConfig): Promise<ListResponse<StockItem>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<StockItem>({ type: 'stock_items' }, `stock_locations/${_stockLocationId}/stock_items`, params, options) as unknown as ListResponse<StockItem>\n\t}\n\n\tasync stock_transfers(stockLocationId: string | StockLocation, params?: QueryParamsList<StockTransfer>, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<StockTransfer>({ type: 'stock_transfers' }, `stock_locations/${_stockLocationId}/stock_transfers`, params, options) as unknown as ListResponse<StockTransfer>\n\t}\n\n\tasync attachments(stockLocationId: string | StockLocation, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `stock_locations/${_stockLocationId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(stockLocationId: string | StockLocation, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stockLocationId = (stockLocationId as StockLocation).id || stockLocationId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stock_locations/${_stockLocationId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisStockLocation(resource: any): resource is StockLocation {\n\t\treturn resource.type && (resource.type === StockLocations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StockLocationRel {\n\t\treturn super.relationshipOneToOne<StockLocationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StockLocationRel[] {\n\t\treturn super.relationshipOneToMany<StockLocationRel>(...ids)\n\t}\n\n\n\ttype(): StockLocationType {\n\t\treturn StockLocations.TYPE\n\t}\n\n}\n\n\nexport default StockLocations\n\nexport type { StockLocation, StockLocationCreate, StockLocationUpdate, StockLocationType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\nimport type { LineItem } from './line_items'\nimport type { Order } from './orders'\nimport type { StockItem, StockItemType } from './stock_items'\nimport type { ReservedStock } from './reserved_stocks'\nimport type { Sku } from './skus'\n\n\ntype StockReservationType = 'stock_reservations'\ntype StockReservationRel = ResourceRel & { type: StockReservationType }\ntype StockItemRel = ResourceRel & { type: StockItemType }\n\n\nexport type StockReservationSort = Pick<StockReservation, 'id' | 'status' | 'quantity' | 'expires_at'> & ResourceSort\n// export type StockReservationFilter = Pick<StockReservation, 'id' | 'status' | 'quantity' | 'expires_at'> & ResourceFilter\n\n\ninterface StockReservation extends Resource {\n\t\n\treadonly type: StockReservationType\n\n\tstatus: 'draft' | 'pending'\n\tquantity: number\n\texpires_at: string\n\n\tline_item?: LineItem | null\n\torder?: Order | null\n\tstock_item?: StockItem | null\n\treserved_stock?: ReservedStock | null\n\tsku?: Sku | null\n\n}\n\n\ninterface StockReservationCreate extends ResourceCreate {\n\t\n\tquantity: number\n\n\tstock_item: StockItemRel\n\n}\n\n\ninterface StockReservationUpdate extends ResourceUpdate {\n\t\n\tquantity?: number | null\n\t_pending?: boolean | null\n\t\n}\n\n\nclass StockReservations extends ApiResource<StockReservation> {\n\n\tstatic readonly TYPE: StockReservationType = 'stock_reservations' as const\n\n\tasync create(resource: StockReservationCreate, params?: QueryParamsRetrieve<StockReservation>, options?: ResourcesConfig): Promise<StockReservation> {\n\t\treturn this.resources.create<StockReservationCreate, StockReservation>({ ...resource, type: StockReservations.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StockReservationUpdate, params?: QueryParamsRetrieve<StockReservation>, options?: ResourcesConfig): Promise<StockReservation> {\n\t\treturn this.resources.update<StockReservationUpdate, StockReservation>({ ...resource, type: StockReservations.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StockReservations.TYPE } : id, options)\n\t}\n\n\tasync line_item(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `stock_reservations/${_stockReservationId}/line_item`, params, options) as unknown as LineItem\n\t}\n\n\tasync order(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `stock_reservations/${_stockReservationId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync stock_item(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<StockItem>, options?: ResourcesConfig): Promise<StockItem> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<StockItem>({ type: 'stock_items' }, `stock_reservations/${_stockReservationId}/stock_item`, params, options) as unknown as StockItem\n\t}\n\n\tasync reserved_stock(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<ReservedStock>, options?: ResourcesConfig): Promise<ReservedStock> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<ReservedStock>({ type: 'reserved_stocks' }, `stock_reservations/${_stockReservationId}/reserved_stock`, params, options) as unknown as ReservedStock\n\t}\n\n\tasync sku(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _stockReservationId = (stockReservationId as StockReservation).id || stockReservationId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `stock_reservations/${_stockReservationId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync _pending(id: string | StockReservation, params?: QueryParamsRetrieve<StockReservation>, options?: ResourcesConfig): Promise<StockReservation> {\n\t\treturn this.resources.update<StockReservationUpdate, StockReservation>({ id: (typeof id === 'string')? id: id.id, type: StockReservations.TYPE, _pending: true }, params, options)\n\t}\n\n\n\tisStockReservation(resource: any): resource is StockReservation {\n\t\treturn resource.type && (resource.type === StockReservations.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StockReservationRel {\n\t\treturn super.relationshipOneToOne<StockReservationRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StockReservationRel[] {\n\t\treturn super.relationshipOneToMany<StockReservationRel>(...ids)\n\t}\n\n\n\ttype(): StockReservationType {\n\t\treturn StockReservations.TYPE\n\t}\n\n}\n\n\nexport default StockReservations\n\nexport type { StockReservation, StockReservationCreate, StockReservationUpdate, StockReservationType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Sku, SkuType } from './skus'\nimport type { StockLocation, StockLocationType } from './stock_locations'\nimport type { Shipment, ShipmentType } from './shipments'\nimport type { LineItem, LineItemType } from './line_items'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype StockTransferType = 'stock_transfers'\ntype StockTransferRel = ResourceRel & { type: StockTransferType }\ntype SkuRel = ResourceRel & { type: SkuType }\ntype StockLocationRel = ResourceRel & { type: StockLocationType }\ntype ShipmentRel = ResourceRel & { type: ShipmentType }\ntype LineItemRel = ResourceRel & { type: LineItemType }\n\n\nexport type StockTransferSort = Pick<StockTransfer, 'id' | 'number' | 'status' | 'quantity' | 'completed_at' | 'cancelled_at'> & ResourceSort\n// export type StockTransferFilter = Pick<StockTransfer, 'id' | 'number' | 'status' | 'quantity' | 'completed_at' | 'cancelled_at'> & ResourceFilter\n\n\ninterface StockTransfer extends Resource {\n\t\n\treadonly type: StockTransferType\n\n\tnumber?: string | null\n\tsku_code?: string | null\n\tstatus: 'draft' | 'upcoming' | 'on_hold' | 'picking' | 'in_transit' | 'completed' | 'cancelled'\n\tquantity: number\n\tcompleted_at?: string | null\n\tcancelled_at?: string | null\n\n\tsku?: Sku | null\n\torigin_stock_location?: StockLocation | null\n\tdestination_stock_location?: StockLocation | null\n\tshipment?: Shipment | null\n\tline_item?: LineItem | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StockTransferCreate extends ResourceCreate {\n\t\n\tsku_code?: string | null\n\tquantity: number\n\n\tsku: SkuRel\n\torigin_stock_location: StockLocationRel\n\tdestination_stock_location: StockLocationRel\n\tshipment?: ShipmentRel | null\n\tline_item?: LineItemRel | null\n\n}\n\n\ninterface StockTransferUpdate extends ResourceUpdate {\n\t\n\tsku_code?: string | null\n\t_upcoming?: boolean | null\n\t_on_hold?: boolean | null\n\t_picking?: boolean | null\n\t_in_transit?: boolean | null\n\t_complete?: boolean | null\n\t_cancel?: boolean | null\n\n\tsku?: SkuRel | null\n\torigin_stock_location?: StockLocationRel | null\n\tdestination_stock_location?: StockLocationRel | null\n\n}\n\n\nclass StockTransfers extends ApiResource<StockTransfer> {\n\n\tstatic readonly TYPE: StockTransferType = 'stock_transfers' as const\n\n\tasync create(resource: StockTransferCreate, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\treturn this.resources.create<StockTransferCreate, StockTransfer>({ ...resource, type: StockTransfers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StockTransferUpdate, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\treturn this.resources.update<StockTransferUpdate, StockTransfer>({ ...resource, type: StockTransfers.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StockTransfers.TYPE } : id, options)\n\t}\n\n\tasync sku(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _stockTransferId = (stockTransferId as StockTransfer).id || stockTransferId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `stock_transfers/${_stockTransferId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync origin_stock_location(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _stockTransferId = (stockTransferId as StockTransfer).id || stockTransferId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `stock_transfers/${_stockTransferId}/origin_stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync destination_stock_location(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve<StockLocation>, options?: ResourcesConfig): Promise<StockLocation> {\n\t\tconst _stockTransferId = (stockTransferId as StockTransfer).id || stockTransferId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `stock_transfers/${_stockTransferId}/destination_stock_location`, params, options) as unknown as StockLocation\n\t}\n\n\tasync shipment(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment> {\n\t\tconst _stockTransferId = (stockTransferId as StockTransfer).id || stockTransferId as string\n\t\treturn this.resources.fetch<Shipment>({ type: 'shipments' }, `stock_transfers/${_stockTransferId}/shipment`, params, options) as unknown as Shipment\n\t}\n\n\tasync line_item(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve<LineItem>, options?: ResourcesConfig): Promise<LineItem> {\n\t\tconst _stockTransferId = (stockTransferId as StockTransfer).id || stockTransferId as string\n\t\treturn this.resources.fetch<LineItem>({ type: 'line_items' }, `stock_transfers/${_stockTransferId}/line_item`, params, options) as unknown as LineItem\n\t}\n\n\tasync events(stockTransferId: string | StockTransfer, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _stockTransferId = (stockTransferId as StockTransfer).id || stockTransferId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `stock_transfers/${_stockTransferId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(stockTransferId: string | StockTransfer, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stockTransferId = (stockTransferId as StockTransfer).id || stockTransferId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stock_transfers/${_stockTransferId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _upcoming(id: string | StockTransfer, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\treturn this.resources.update<StockTransferUpdate, StockTransfer>({ id: (typeof id === 'string')? id: id.id, type: StockTransfers.TYPE, _upcoming: true }, params, options)\n\t}\n\n\tasync _on_hold(id: string | StockTransfer, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\treturn this.resources.update<StockTransferUpdate, StockTransfer>({ id: (typeof id === 'string')? id: id.id, type: StockTransfers.TYPE, _on_hold: true }, params, options)\n\t}\n\n\tasync _picking(id: string | StockTransfer, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\treturn this.resources.update<StockTransferUpdate, StockTransfer>({ id: (typeof id === 'string')? id: id.id, type: StockTransfers.TYPE, _picking: true }, params, options)\n\t}\n\n\tasync _in_transit(id: string | StockTransfer, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\treturn this.resources.update<StockTransferUpdate, StockTransfer>({ id: (typeof id === 'string')? id: id.id, type: StockTransfers.TYPE, _in_transit: true }, params, options)\n\t}\n\n\tasync _complete(id: string | StockTransfer, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\treturn this.resources.update<StockTransferUpdate, StockTransfer>({ id: (typeof id === 'string')? id: id.id, type: StockTransfers.TYPE, _complete: true }, params, options)\n\t}\n\n\tasync _cancel(id: string | StockTransfer, params?: QueryParamsRetrieve<StockTransfer>, options?: ResourcesConfig): Promise<StockTransfer> {\n\t\treturn this.resources.update<StockTransferUpdate, StockTransfer>({ id: (typeof id === 'string')? id: id.id, type: StockTransfers.TYPE, _cancel: true }, params, options)\n\t}\n\n\n\tisStockTransfer(resource: any): resource is StockTransfer {\n\t\treturn resource.type && (resource.type === StockTransfers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StockTransferRel {\n\t\treturn super.relationshipOneToOne<StockTransferRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StockTransferRel[] {\n\t\treturn super.relationshipOneToMany<StockTransferRel>(...ids)\n\t}\n\n\n\ttype(): StockTransferType {\n\t\treturn StockTransfers.TYPE\n\t}\n\n}\n\n\nexport default StockTransfers\n\nexport type { StockTransfer, StockTransferCreate, StockTransferUpdate, StockTransferType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { PaymentMethod } from './payment_methods'\nimport type { Version } from './versions'\nimport type { StripePayment } from './stripe_payments'\n\n\ntype StripeGatewayType = 'stripe_gateways'\ntype StripeGatewayRel = ResourceRel & { type: StripeGatewayType }\n\n\nexport type StripeGatewaySort = Pick<StripeGateway, 'id' | 'name'> & ResourceSort\n// export type StripeGatewayFilter = Pick<StripeGateway, 'id' | 'name'> & ResourceFilter\n\n\ninterface StripeGateway extends Resource {\n\t\n\treadonly type: StripeGatewayType\n\n\tname: string\n\tauto_payments?: boolean | null\n\twebhook_endpoint_id?: string | null\n\twebhook_endpoint_secret?: string | null\n\twebhook_endpoint_url?: string | null\n\n\tpayment_methods?: PaymentMethod[] | null\n\tversions?: Version[] | null\n\tstripe_payments?: StripePayment[] | null\n\n}\n\n\ninterface StripeGatewayCreate extends ResourceCreate {\n\t\n\tname: string\n\tlogin: string\n\tpublishable_key?: string | null\n\tauto_payments?: boolean | null\n\t\n}\n\n\ninterface StripeGatewayUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tauto_payments?: boolean | null\n\t\n}\n\n\nclass StripeGateways extends ApiResource<StripeGateway> {\n\n\tstatic readonly TYPE: StripeGatewayType = 'stripe_gateways' as const\n\n\tasync create(resource: StripeGatewayCreate, params?: QueryParamsRetrieve<StripeGateway>, options?: ResourcesConfig): Promise<StripeGateway> {\n\t\treturn this.resources.create<StripeGatewayCreate, StripeGateway>({ ...resource, type: StripeGateways.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StripeGatewayUpdate, params?: QueryParamsRetrieve<StripeGateway>, options?: ResourcesConfig): Promise<StripeGateway> {\n\t\treturn this.resources.update<StripeGatewayUpdate, StripeGateway>({ ...resource, type: StripeGateways.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StripeGateways.TYPE } : id, options)\n\t}\n\n\tasync payment_methods(stripeGatewayId: string | StripeGateway, params?: QueryParamsList<PaymentMethod>, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>> {\n\t\tconst _stripeGatewayId = (stripeGatewayId as StripeGateway).id || stripeGatewayId as string\n\t\treturn this.resources.fetch<PaymentMethod>({ type: 'payment_methods' }, `stripe_gateways/${_stripeGatewayId}/payment_methods`, params, options) as unknown as ListResponse<PaymentMethod>\n\t}\n\n\tasync versions(stripeGatewayId: string | StripeGateway, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stripeGatewayId = (stripeGatewayId as StripeGateway).id || stripeGatewayId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stripe_gateways/${_stripeGatewayId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync stripe_payments(stripeGatewayId: string | StripeGateway, params?: QueryParamsList<StripePayment>, options?: ResourcesConfig): Promise<ListResponse<StripePayment>> {\n\t\tconst _stripeGatewayId = (stripeGatewayId as StripeGateway).id || stripeGatewayId as string\n\t\treturn this.resources.fetch<StripePayment>({ type: 'stripe_payments' }, `stripe_gateways/${_stripeGatewayId}/stripe_payments`, params, options) as unknown as ListResponse<StripePayment>\n\t}\n\n\n\tisStripeGateway(resource: any): resource is StripeGateway {\n\t\treturn resource.type && (resource.type === StripeGateways.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StripeGatewayRel {\n\t\treturn super.relationshipOneToOne<StripeGatewayRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StripeGatewayRel[] {\n\t\treturn super.relationshipOneToMany<StripeGatewayRel>(...ids)\n\t}\n\n\n\ttype(): StripeGatewayType {\n\t\treturn StripeGateways.TYPE\n\t}\n\n}\n\n\nexport default StripeGateways\n\nexport type { StripeGateway, StripeGatewayCreate, StripeGatewayUpdate, StripeGatewayType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { PaymentGateway } from './payment_gateways'\nimport type { Version } from './versions'\n\n\ntype StripePaymentType = 'stripe_payments'\ntype StripePaymentRel = ResourceRel & { type: StripePaymentType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type StripePaymentSort = Pick<StripePayment, 'id'> & ResourceSort\n// export type StripePaymentFilter = Pick<StripePayment, 'id'> & ResourceFilter\n\n\ninterface StripePayment extends Resource {\n\t\n\treadonly type: StripePaymentType\n\n\tstripe_id?: string | null\n\tclient_secret?: string | null\n\tpublishable_key?: string | null\n\toptions?: Record<string, any> | null\n\tpayment_method?: Record<string, any> | null\n\tmismatched_amounts?: boolean | null\n\tintent_amount_cents: number\n\tintent_amount_float?: number | null\n\tformatted_intent_amount?: string | null\n\treturn_url?: string | null\n\treceipt_email?: string | null\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tpayment_gateway?: PaymentGateway | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface StripePaymentCreate extends ResourceCreate {\n\t\n\tstripe_id?: string | null\n\tclient_secret?: string | null\n\toptions?: Record<string, any> | null\n\treturn_url?: string | null\n\treceipt_email?: string | null\n\n\torder: OrderRel\n\n}\n\n\ninterface StripePaymentUpdate extends ResourceUpdate {\n\t\n\toptions?: Record<string, any> | null\n\treturn_url?: string | null\n\t_update?: boolean | null\n\t_refresh?: boolean | null\n\n\torder?: OrderRel | null\n\n}\n\n\nclass StripePayments extends ApiResource<StripePayment> {\n\n\tstatic readonly TYPE: StripePaymentType = 'stripe_payments' as const\n\n\tasync create(resource: StripePaymentCreate, params?: QueryParamsRetrieve<StripePayment>, options?: ResourcesConfig): Promise<StripePayment> {\n\t\treturn this.resources.create<StripePaymentCreate, StripePayment>({ ...resource, type: StripePayments.TYPE }, params, options)\n\t}\n\n\tasync update(resource: StripePaymentUpdate, params?: QueryParamsRetrieve<StripePayment>, options?: ResourcesConfig): Promise<StripePayment> {\n\t\treturn this.resources.update<StripePaymentUpdate, StripePayment>({ ...resource, type: StripePayments.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: StripePayments.TYPE } : id, options)\n\t}\n\n\tasync order(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _stripePaymentId = (stripePaymentId as StripePayment).id || stripePaymentId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `stripe_payments/${_stripePaymentId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync payment_gateway(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway> {\n\t\tconst _stripePaymentId = (stripePaymentId as StripePayment).id || stripePaymentId as string\n\t\treturn this.resources.fetch<PaymentGateway>({ type: 'payment_gateways' }, `stripe_payments/${_stripePaymentId}/payment_gateway`, params, options) as unknown as PaymentGateway\n\t}\n\n\tasync versions(stripePaymentId: string | StripePayment, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _stripePaymentId = (stripePaymentId as StripePayment).id || stripePaymentId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `stripe_payments/${_stripePaymentId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _update(id: string | StripePayment, params?: QueryParamsRetrieve<StripePayment>, options?: ResourcesConfig): Promise<StripePayment> {\n\t\treturn this.resources.update<StripePaymentUpdate, StripePayment>({ id: (typeof id === 'string')? id: id.id, type: StripePayments.TYPE, _update: true }, params, options)\n\t}\n\n\tasync _refresh(id: string | StripePayment, params?: QueryParamsRetrieve<StripePayment>, options?: ResourcesConfig): Promise<StripePayment> {\n\t\treturn this.resources.update<StripePaymentUpdate, StripePayment>({ id: (typeof id === 'string')? id: id.id, type: StripePayments.TYPE, _refresh: true }, params, options)\n\t}\n\n\n\tisStripePayment(resource: any): resource is StripePayment {\n\t\treturn resource.type && (resource.type === StripePayments.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): StripePaymentRel {\n\t\treturn super.relationshipOneToOne<StripePaymentRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): StripePaymentRel[] {\n\t\treturn super.relationshipOneToMany<StripePaymentRel>(...ids)\n\t}\n\n\n\ttype(): StripePaymentType {\n\t\treturn StripePayments.TYPE\n\t}\n\n}\n\n\nexport default StripePayments\n\nexport type { StripePayment, StripePaymentCreate, StripePaymentUpdate, StripePaymentType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { OrderSubscription } from './order_subscriptions'\nimport type { Attachment } from './attachments'\n\n\ntype SubscriptionModelType = 'subscription_models'\ntype SubscriptionModelRel = ResourceRel & { type: SubscriptionModelType }\n\n\nexport type SubscriptionModelSort = Pick<SubscriptionModel, 'id' | 'name' | 'strategy'> & ResourceSort\n// export type SubscriptionModelFilter = Pick<SubscriptionModel, 'id' | 'name' | 'strategy' | 'auto_activate' | 'auto_cancel'> & ResourceFilter\n\n\ninterface SubscriptionModel extends Resource {\n\t\n\treadonly type: SubscriptionModelType\n\n\tname: string\n\tstrategy?: string | null\n\tfrequencies: string[]\n\tauto_activate?: boolean | null\n\tauto_cancel?: boolean | null\n\n\tmarkets?: Market[] | null\n\torder_subscriptions?: OrderSubscription[] | null\n\tattachments?: Attachment[] | null\n\n}\n\n\ninterface SubscriptionModelCreate extends ResourceCreate {\n\t\n\tname: string\n\tstrategy?: string | null\n\tfrequencies: string[]\n\tauto_activate?: boolean | null\n\tauto_cancel?: boolean | null\n\t\n}\n\n\ninterface SubscriptionModelUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tstrategy?: string | null\n\tfrequencies?: string[] | null\n\tauto_activate?: boolean | null\n\tauto_cancel?: boolean | null\n\t\n}\n\n\nclass SubscriptionModels extends ApiResource<SubscriptionModel> {\n\n\tstatic readonly TYPE: SubscriptionModelType = 'subscription_models' as const\n\n\tasync create(resource: SubscriptionModelCreate, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\treturn this.resources.create<SubscriptionModelCreate, SubscriptionModel>({ ...resource, type: SubscriptionModels.TYPE }, params, options)\n\t}\n\n\tasync update(resource: SubscriptionModelUpdate, params?: QueryParamsRetrieve<SubscriptionModel>, options?: ResourcesConfig): Promise<SubscriptionModel> {\n\t\treturn this.resources.update<SubscriptionModelUpdate, SubscriptionModel>({ ...resource, type: SubscriptionModels.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: SubscriptionModels.TYPE } : id, options)\n\t}\n\n\tasync markets(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _subscriptionModelId = (subscriptionModelId as SubscriptionModel).id || subscriptionModelId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `subscription_models/${_subscriptionModelId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync order_subscriptions(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList<OrderSubscription>, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>> {\n\t\tconst _subscriptionModelId = (subscriptionModelId as SubscriptionModel).id || subscriptionModelId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `subscription_models/${_subscriptionModelId}/order_subscriptions`, params, options) as unknown as ListResponse<OrderSubscription>\n\t}\n\n\tasync attachments(subscriptionModelId: string | SubscriptionModel, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _subscriptionModelId = (subscriptionModelId as SubscriptionModel).id || subscriptionModelId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `subscription_models/${_subscriptionModelId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\n\tisSubscriptionModel(resource: any): resource is SubscriptionModel {\n\t\treturn resource.type && (resource.type === SubscriptionModels.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): SubscriptionModelRel {\n\t\treturn super.relationshipOneToOne<SubscriptionModelRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): SubscriptionModelRel[] {\n\t\treturn super.relationshipOneToMany<SubscriptionModelRel>(...ids)\n\t}\n\n\n\ttype(): SubscriptionModelType {\n\t\treturn SubscriptionModels.TYPE\n\t}\n\n}\n\n\nexport default SubscriptionModels\n\nexport type { SubscriptionModel, SubscriptionModelCreate, SubscriptionModelUpdate, SubscriptionModelType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve } from '../query'\n\n\n\ntype TagType = 'tags'\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type TagSort = Pick<Tag, 'id' | 'name'> & ResourceSort\n// export type TagFilter = Pick<Tag, 'id' | 'name'> & ResourceFilter\n\n\ninterface Tag extends Resource {\n\t\n\treadonly type: TagType\n\n\tname: string\n\t\n}\n\n\ninterface TagCreate extends ResourceCreate {\n\t\n\tname: string\n\t\n}\n\n\ninterface TagUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\t\n}\n\n\nclass Tags extends ApiResource<Tag> {\n\n\tstatic readonly TYPE: TagType = 'tags' as const\n\n\tasync create(resource: TagCreate, params?: QueryParamsRetrieve<Tag>, options?: ResourcesConfig): Promise<Tag> {\n\t\treturn this.resources.create<TagCreate, Tag>({ ...resource, type: Tags.TYPE }, params, options)\n\t}\n\n\tasync update(resource: TagUpdate, params?: QueryParamsRetrieve<Tag>, options?: ResourcesConfig): Promise<Tag> {\n\t\treturn this.resources.update<TagUpdate, Tag>({ ...resource, type: Tags.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Tags.TYPE } : id, options)\n\t}\n\n\n\tisTag(resource: any): resource is Tag {\n\t\treturn resource.type && (resource.type === Tags.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TagRel {\n\t\treturn super.relationshipOneToOne<TagRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TagRel[] {\n\t\treturn super.relationshipOneToMany<TagRel>(...ids)\n\t}\n\n\n\ttype(): TagType {\n\t\treturn Tags.TYPE\n\t}\n\n}\n\n\nexport default Tags\n\nexport type { Tag, TagCreate, TagUpdate, TagType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype TaxCalculatorType = 'tax_calculators'\ntype TaxCalculatorRel = ResourceRel & { type: TaxCalculatorType }\n\n\nexport type TaxCalculatorSort = Pick<TaxCalculator, 'id' | 'name'> & ResourceSort\n// export type TaxCalculatorFilter = Pick<TaxCalculator, 'id' | 'name'> & ResourceFilter\n\n\ninterface TaxCalculator extends Resource {\n\t\n\treadonly type: TaxCalculatorType\n\n\tname: string\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass TaxCalculators extends ApiResource<TaxCalculator> {\n\n\tstatic readonly TYPE: TaxCalculatorType = 'tax_calculators' as const\n\n\tasync markets(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `tax_calculators/${_taxCalculatorId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `tax_calculators/${_taxCalculatorId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _taxCalculatorId = (taxCalculatorId as TaxCalculator).id || taxCalculatorId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `tax_calculators/${_taxCalculatorId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisTaxCalculator(resource: any): resource is TaxCalculator {\n\t\treturn resource.type && (resource.type === TaxCalculators.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TaxCalculatorRel {\n\t\treturn super.relationshipOneToOne<TaxCalculatorRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TaxCalculatorRel[] {\n\t\treturn super.relationshipOneToMany<TaxCalculatorRel>(...ids)\n\t}\n\n\n\ttype(): TaxCalculatorType {\n\t\treturn TaxCalculators.TYPE\n\t}\n\n}\n\n\nexport default TaxCalculators\n\nexport type { TaxCalculator, TaxCalculatorType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Sku, SkuType } from './skus'\nimport type { AvalaraAccount, AvalaraAccountType } from './avalara_accounts'\nimport type { TaxjarAccount, TaxjarAccountType } from './taxjar_accounts'\nimport type { ManualTaxCalculator, ManualTaxCalculatorType } from './manual_tax_calculators'\nimport type { ExternalTaxCalculator, ExternalTaxCalculatorType } from './external_tax_calculators'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\n\n\ntype TaxCategoryType = 'tax_categories'\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\ntype SkuRel = ResourceRel & { type: SkuType }\ntype AvalaraAccountRel = ResourceRel & { type: AvalaraAccountType }\ntype TaxjarAccountRel = ResourceRel & { type: TaxjarAccountType }\ntype ManualTaxCalculatorRel = ResourceRel & { type: ManualTaxCalculatorType }\ntype ExternalTaxCalculatorRel = ResourceRel & { type: ExternalTaxCalculatorType }\n\n\nexport type TaxCategorySort = Pick<TaxCategory, 'id' | 'code'> & ResourceSort\n// export type TaxCategoryFilter = Pick<TaxCategory, 'id' | 'code'> & ResourceFilter\n\n\ninterface TaxCategory extends Resource {\n\t\n\treadonly type: TaxCategoryType\n\n\tcode: string\n\tsku_code?: string | null\n\n\tsku?: Sku | null\n\ttax_calculator?: AvalaraAccount | TaxjarAccount | ManualTaxCalculator | ExternalTaxCalculator | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface TaxCategoryCreate extends ResourceCreate {\n\t\n\tcode: string\n\tsku_code?: string | null\n\n\tsku: SkuRel\n\ttax_calculator: AvalaraAccountRel | TaxjarAccountRel | ManualTaxCalculatorRel | ExternalTaxCalculatorRel\n\n}\n\n\ninterface TaxCategoryUpdate extends ResourceUpdate {\n\t\n\tcode?: string | null\n\tsku_code?: string | null\n\n\tsku?: SkuRel | null\n\n}\n\n\nclass TaxCategories extends ApiResource<TaxCategory> {\n\n\tstatic readonly TYPE: TaxCategoryType = 'tax_categories' as const\n\n\tasync create(resource: TaxCategoryCreate, params?: QueryParamsRetrieve<TaxCategory>, options?: ResourcesConfig): Promise<TaxCategory> {\n\t\treturn this.resources.create<TaxCategoryCreate, TaxCategory>({ ...resource, type: TaxCategories.TYPE }, params, options)\n\t}\n\n\tasync update(resource: TaxCategoryUpdate, params?: QueryParamsRetrieve<TaxCategory>, options?: ResourcesConfig): Promise<TaxCategory> {\n\t\treturn this.resources.update<TaxCategoryUpdate, TaxCategory>({ ...resource, type: TaxCategories.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: TaxCategories.TYPE } : id, options)\n\t}\n\n\tasync sku(taxCategoryId: string | TaxCategory, params?: QueryParamsRetrieve<Sku>, options?: ResourcesConfig): Promise<Sku> {\n\t\tconst _taxCategoryId = (taxCategoryId as TaxCategory).id || taxCategoryId as string\n\t\treturn this.resources.fetch<Sku>({ type: 'skus' }, `tax_categories/${_taxCategoryId}/sku`, params, options) as unknown as Sku\n\t}\n\n\tasync attachments(taxCategoryId: string | TaxCategory, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _taxCategoryId = (taxCategoryId as TaxCategory).id || taxCategoryId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `tax_categories/${_taxCategoryId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(taxCategoryId: string | TaxCategory, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _taxCategoryId = (taxCategoryId as TaxCategory).id || taxCategoryId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `tax_categories/${_taxCategoryId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisTaxCategory(resource: any): resource is TaxCategory {\n\t\treturn resource.type && (resource.type === TaxCategories.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TaxCategoryRel {\n\t\treturn super.relationshipOneToOne<TaxCategoryRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TaxCategoryRel[] {\n\t\treturn super.relationshipOneToMany<TaxCategoryRel>(...ids)\n\t}\n\n\n\ttype(): TaxCategoryType {\n\t\treturn TaxCategories.TYPE\n\t}\n\n}\n\n\nexport default TaxCategories\n\nexport type { TaxCategory, TaxCategoryCreate, TaxCategoryUpdate, TaxCategoryType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { ManualTaxCalculator, ManualTaxCalculatorType } from './manual_tax_calculators'\nimport type { Version } from './versions'\n\n\ntype TaxRuleType = 'tax_rules'\ntype TaxRuleRel = ResourceRel & { type: TaxRuleType }\ntype ManualTaxCalculatorRel = ResourceRel & { type: ManualTaxCalculatorType }\n\n\nexport type TaxRuleSort = Pick<TaxRule, 'id' | 'name' | 'tax_rate'> & ResourceSort\n// export type TaxRuleFilter = Pick<TaxRule, 'id' | 'name' | 'tax_rate' | 'freight_taxable' | 'payment_method_taxable' | 'gift_card_taxable' | 'adjustment_taxable'> & ResourceFilter\n\n\ninterface TaxRule extends Resource {\n\t\n\treadonly type: TaxRuleType\n\n\tname: string\n\ttax_rate?: number | null\n\tcountry_code_regex?: string | null\n\tnot_country_code_regex?: string | null\n\tstate_code_regex?: string | null\n\tnot_state_code_regex?: string | null\n\tzip_code_regex?: string | null\n\tnot_zip_code_regex?: string | null\n\tfreight_taxable?: boolean | null\n\tpayment_method_taxable?: boolean | null\n\tgift_card_taxable?: boolean | null\n\tadjustment_taxable?: boolean | null\n\tbreakdown?: Record<string, any> | null\n\n\tmanual_tax_calculator?: ManualTaxCalculator | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface TaxRuleCreate extends ResourceCreate {\n\t\n\tname: string\n\ttax_rate?: number | null\n\tcountry_code_regex?: string | null\n\tnot_country_code_regex?: string | null\n\tstate_code_regex?: string | null\n\tnot_state_code_regex?: string | null\n\tzip_code_regex?: string | null\n\tnot_zip_code_regex?: string | null\n\tfreight_taxable?: boolean | null\n\tpayment_method_taxable?: boolean | null\n\tgift_card_taxable?: boolean | null\n\tadjustment_taxable?: boolean | null\n\n\tmanual_tax_calculator: ManualTaxCalculatorRel\n\n}\n\n\ninterface TaxRuleUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\ttax_rate?: number | null\n\tcountry_code_regex?: string | null\n\tnot_country_code_regex?: string | null\n\tstate_code_regex?: string | null\n\tnot_state_code_regex?: string | null\n\tzip_code_regex?: string | null\n\tnot_zip_code_regex?: string | null\n\tfreight_taxable?: boolean | null\n\tpayment_method_taxable?: boolean | null\n\tgift_card_taxable?: boolean | null\n\tadjustment_taxable?: boolean | null\n\n\tmanual_tax_calculator?: ManualTaxCalculatorRel | null\n\n}\n\n\nclass TaxRules extends ApiResource<TaxRule> {\n\n\tstatic readonly TYPE: TaxRuleType = 'tax_rules' as const\n\n\tasync create(resource: TaxRuleCreate, params?: QueryParamsRetrieve<TaxRule>, options?: ResourcesConfig): Promise<TaxRule> {\n\t\treturn this.resources.create<TaxRuleCreate, TaxRule>({ ...resource, type: TaxRules.TYPE }, params, options)\n\t}\n\n\tasync update(resource: TaxRuleUpdate, params?: QueryParamsRetrieve<TaxRule>, options?: ResourcesConfig): Promise<TaxRule> {\n\t\treturn this.resources.update<TaxRuleUpdate, TaxRule>({ ...resource, type: TaxRules.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: TaxRules.TYPE } : id, options)\n\t}\n\n\tasync manual_tax_calculator(taxRuleId: string | TaxRule, params?: QueryParamsRetrieve<ManualTaxCalculator>, options?: ResourcesConfig): Promise<ManualTaxCalculator> {\n\t\tconst _taxRuleId = (taxRuleId as TaxRule).id || taxRuleId as string\n\t\treturn this.resources.fetch<ManualTaxCalculator>({ type: 'manual_tax_calculators' }, `tax_rules/${_taxRuleId}/manual_tax_calculator`, params, options) as unknown as ManualTaxCalculator\n\t}\n\n\tasync versions(taxRuleId: string | TaxRule, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _taxRuleId = (taxRuleId as TaxRule).id || taxRuleId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `tax_rules/${_taxRuleId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisTaxRule(resource: any): resource is TaxRule {\n\t\treturn resource.type && (resource.type === TaxRules.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TaxRuleRel {\n\t\treturn super.relationshipOneToOne<TaxRuleRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TaxRuleRel[] {\n\t\treturn super.relationshipOneToMany<TaxRuleRel>(...ids)\n\t}\n\n\n\ttype(): TaxRuleType {\n\t\treturn TaxRules.TYPE\n\t}\n\n}\n\n\nexport default TaxRules\n\nexport type { TaxRule, TaxRuleCreate, TaxRuleUpdate, TaxRuleType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Market } from './markets'\nimport type { Attachment } from './attachments'\nimport type { Version } from './versions'\nimport type { TaxCategory, TaxCategoryType } from './tax_categories'\n\n\ntype TaxjarAccountType = 'taxjar_accounts'\ntype TaxjarAccountRel = ResourceRel & { type: TaxjarAccountType }\ntype TaxCategoryRel = ResourceRel & { type: TaxCategoryType }\n\n\nexport type TaxjarAccountSort = Pick<TaxjarAccount, 'id' | 'name'> & ResourceSort\n// export type TaxjarAccountFilter = Pick<TaxjarAccount, 'id' | 'name'> & ResourceFilter\n\n\ninterface TaxjarAccount extends Resource {\n\t\n\treadonly type: TaxjarAccountType\n\n\tname: string\n\n\tmarkets?: Market[] | null\n\tattachments?: Attachment[] | null\n\tversions?: Version[] | null\n\ttax_categories?: TaxCategory[] | null\n\n}\n\n\ninterface TaxjarAccountCreate extends ResourceCreate {\n\t\n\tname: string\n\tapi_key: string\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\ninterface TaxjarAccountUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\tapi_key?: string | null\n\n\ttax_categories?: TaxCategoryRel[] | null\n\n}\n\n\nclass TaxjarAccounts extends ApiResource<TaxjarAccount> {\n\n\tstatic readonly TYPE: TaxjarAccountType = 'taxjar_accounts' as const\n\n\tasync create(resource: TaxjarAccountCreate, params?: QueryParamsRetrieve<TaxjarAccount>, options?: ResourcesConfig): Promise<TaxjarAccount> {\n\t\treturn this.resources.create<TaxjarAccountCreate, TaxjarAccount>({ ...resource, type: TaxjarAccounts.TYPE }, params, options)\n\t}\n\n\tasync update(resource: TaxjarAccountUpdate, params?: QueryParamsRetrieve<TaxjarAccount>, options?: ResourcesConfig): Promise<TaxjarAccount> {\n\t\treturn this.resources.update<TaxjarAccountUpdate, TaxjarAccount>({ ...resource, type: TaxjarAccounts.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: TaxjarAccounts.TYPE } : id, options)\n\t}\n\n\tasync markets(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _taxjarAccountId = (taxjarAccountId as TaxjarAccount).id || taxjarAccountId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `taxjar_accounts/${_taxjarAccountId}/markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync attachments(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _taxjarAccountId = (taxjarAccountId as TaxjarAccount).id || taxjarAccountId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `taxjar_accounts/${_taxjarAccountId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync versions(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _taxjarAccountId = (taxjarAccountId as TaxjarAccount).id || taxjarAccountId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `taxjar_accounts/${_taxjarAccountId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync tax_categories(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList<TaxCategory>, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>> {\n\t\tconst _taxjarAccountId = (taxjarAccountId as TaxjarAccount).id || taxjarAccountId as string\n\t\treturn this.resources.fetch<TaxCategory>({ type: 'tax_categories' }, `taxjar_accounts/${_taxjarAccountId}/tax_categories`, params, options) as unknown as ListResponse<TaxCategory>\n\t}\n\n\n\tisTaxjarAccount(resource: any): resource is TaxjarAccount {\n\t\treturn resource.type && (resource.type === TaxjarAccounts.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TaxjarAccountRel {\n\t\treturn super.relationshipOneToOne<TaxjarAccountRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TaxjarAccountRel[] {\n\t\treturn super.relationshipOneToMany<TaxjarAccountRel>(...ids)\n\t}\n\n\n\ttype(): TaxjarAccountType {\n\t\treturn TaxjarAccounts.TYPE\n\t}\n\n}\n\n\nexport default TaxjarAccounts\n\nexport type { TaxjarAccount, TaxjarAccountCreate, TaxjarAccountUpdate, TaxjarAccountType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order } from './orders'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\n\n\ntype TransactionType = 'transactions'\ntype TransactionRel = ResourceRel & { type: TransactionType }\n\n\nexport type TransactionSort = Pick<Transaction, 'id' | 'number' | 'amount_cents'> & ResourceSort\n// export type TransactionFilter = Pick<Transaction, 'id' | 'number' | 'currency_code' | 'amount_cents' | 'succeeded' | 'message' | 'error_code' | 'error_detail' | 'token' | 'gateway_transaction_id'> & ResourceFilter\n\n\ninterface Transaction extends Resource {\n\t\n\treadonly type: TransactionType\n\n\tnumber: string\n\tcurrency_code: string\n\tamount_cents: number\n\tamount_float: number\n\tformatted_amount: string\n\tsucceeded: boolean\n\tmessage?: string | null\n\terror_code?: string | null\n\terror_detail?: string | null\n\ttoken?: string | null\n\tgateway_transaction_id?: string | null\n\n\torder?: Order | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\n}\n\n\nclass Transactions extends ApiResource<Transaction> {\n\n\tstatic readonly TYPE: TransactionType = 'transactions' as const\n\n\tasync order(transactionId: string | Transaction, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _transactionId = (transactionId as Transaction).id || transactionId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `transactions/${_transactionId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(transactionId: string | Transaction, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _transactionId = (transactionId as Transaction).id || transactionId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `transactions/${_transactionId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(transactionId: string | Transaction, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _transactionId = (transactionId as Transaction).id || transactionId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `transactions/${_transactionId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(transactionId: string | Transaction, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _transactionId = (transactionId as Transaction).id || transactionId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `transactions/${_transactionId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisTransaction(resource: any): resource is Transaction {\n\t\treturn resource.type && (resource.type === Transactions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): TransactionRel {\n\t\treturn super.relationshipOneToOne<TransactionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): TransactionRel[] {\n\t\treturn super.relationshipOneToMany<TransactionRel>(...ids)\n\t}\n\n\n\ttype(): TransactionType {\n\t\treturn Transactions.TYPE\n\t}\n\n}\n\n\nexport default Transactions\n\nexport type { Transaction, TransactionType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourceRel, ResourceSort, /* ResourceFilter */ } from '../resource'\n\n\n\n\ntype VersionType = 'versions'\ntype VersionRel = ResourceRel & { type: VersionType }\n\n\nexport type VersionSort = Pick<Version, 'id'> & ResourceSort\n// export type VersionFilter = Pick<Version, 'id' | 'resource_type' | 'resource_id'> & ResourceFilter\n\n\ninterface Version extends Resource {\n\t\n\treadonly type: VersionType\n\n\tresource_type?: string | null\n\tresource_id?: string | null\n\tevent?: string | null\n\tchanges?: Record<string, any> | null\n\twho?: Record<string, any> | null\n\t\n}\n\n\nclass Versions extends ApiResource<Version> {\n\n\tstatic readonly TYPE: VersionType = 'versions' as const\n\n\t\n\n\n\tisVersion(resource: any): resource is Version {\n\t\treturn resource.type && (resource.type === Versions.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): VersionRel {\n\t\treturn super.relationshipOneToOne<VersionRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): VersionRel[] {\n\t\treturn super.relationshipOneToMany<VersionRel>(...ids)\n\t}\n\n\n\ttype(): VersionType {\n\t\treturn Versions.TYPE\n\t}\n\n}\n\n\nexport default Versions\n\nexport type { Version, VersionType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order } from './orders'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Version } from './versions'\nimport type { Authorization } from './authorizations'\n\n\ntype VoidType = 'voids'\ntype VoidRel = ResourceRel & { type: VoidType }\n\n\nexport type VoidSort = Pick<Void, 'id' | 'number' | 'amount_cents'> & ResourceSort\n// export type VoidFilter = Pick<Void, 'id' | 'number' | 'currency_code' | 'amount_cents' | 'succeeded' | 'message' | 'error_code' | 'error_detail' | 'token' | 'gateway_transaction_id'> & ResourceFilter\n\n\ninterface Void extends Resource {\n\t\n\treadonly type: VoidType\n\n\tnumber: string\n\tcurrency_code: string\n\tamount_cents: number\n\tamount_float: number\n\tformatted_amount: string\n\tsucceeded: boolean\n\tmessage?: string | null\n\terror_code?: string | null\n\terror_detail?: string | null\n\ttoken?: string | null\n\tgateway_transaction_id?: string | null\n\n\torder?: Order | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\tversions?: Version[] | null\n\treference_authorization?: Authorization | null\n\n}\n\n\nclass Voids extends ApiResource<Void> {\n\n\tstatic readonly TYPE: VoidType = 'voids' as const\n\n\tasync order(voidId: string | Void, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _voidId = (voidId as Void).id || voidId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `voids/${_voidId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync attachments(voidId: string | Void, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _voidId = (voidId as Void).id || voidId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `voids/${_voidId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(voidId: string | Void, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _voidId = (voidId as Void).id || voidId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `voids/${_voidId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync versions(voidId: string | Void, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _voidId = (voidId as Void).id || voidId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `voids/${_voidId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync reference_authorization(voidId: string | Void, params?: QueryParamsRetrieve<Authorization>, options?: ResourcesConfig): Promise<Authorization> {\n\t\tconst _voidId = (voidId as Void).id || voidId as string\n\t\treturn this.resources.fetch<Authorization>({ type: 'authorizations' }, `voids/${_voidId}/reference_authorization`, params, options) as unknown as Authorization\n\t}\n\n\n\tisVoid(resource: any): resource is Void {\n\t\treturn resource.type && (resource.type === Voids.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): VoidRel {\n\t\treturn super.relationshipOneToOne<VoidRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): VoidRel[] {\n\t\treturn super.relationshipOneToMany<VoidRel>(...ids)\n\t}\n\n\n\ttype(): VoidType {\n\t\treturn Voids.TYPE\n\t}\n\n}\n\n\nexport default Voids\n\nexport type { Void, VoidType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { EventCallback } from './event_callbacks'\nimport type { Version } from './versions'\n\n\ntype WebhookType = 'webhooks'\ntype WebhookRel = ResourceRel & { type: WebhookType }\n\n\nexport type WebhookSort = Pick<Webhook, 'id' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceSort\n// export type WebhookFilter = Pick<Webhook, 'id' | 'name' | 'topic' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceFilter\n\n\ninterface Webhook extends Resource {\n\t\n\treadonly type: WebhookType\n\n\tname?: string | null\n\ttopic: string\n\tcallback_url: string\n\tinclude_resources?: string[] | null\n\tdisabled_at?: string | null\n\tcircuit_state?: string | null\n\tcircuit_failure_count?: number | null\n\tshared_secret: string\n\n\tlast_event_callbacks?: EventCallback[] | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface WebhookCreate extends ResourceCreate {\n\t\n\tname?: string | null\n\ttopic: string\n\tcallback_url: string\n\tinclude_resources?: string[] | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\t\n}\n\n\ninterface WebhookUpdate extends ResourceUpdate {\n\t\n\tname?: string | null\n\ttopic?: string | null\n\tcallback_url?: string | null\n\tinclude_resources?: string[] | null\n\t_disable?: boolean | null\n\t_enable?: boolean | null\n\t_reset_circuit?: boolean | null\n\t\n}\n\n\nclass Webhooks extends ApiResource<Webhook> {\n\n\tstatic readonly TYPE: WebhookType = 'webhooks' as const\n\n\tasync create(resource: WebhookCreate, params?: QueryParamsRetrieve<Webhook>, options?: ResourcesConfig): Promise<Webhook> {\n\t\treturn this.resources.create<WebhookCreate, Webhook>({ ...resource, type: Webhooks.TYPE }, params, options)\n\t}\n\n\tasync update(resource: WebhookUpdate, params?: QueryParamsRetrieve<Webhook>, options?: ResourcesConfig): Promise<Webhook> {\n\t\treturn this.resources.update<WebhookUpdate, Webhook>({ ...resource, type: Webhooks.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Webhooks.TYPE } : id, options)\n\t}\n\n\tasync last_event_callbacks(webhookId: string | Webhook, params?: QueryParamsList<EventCallback>, options?: ResourcesConfig): Promise<ListResponse<EventCallback>> {\n\t\tconst _webhookId = (webhookId as Webhook).id || webhookId as string\n\t\treturn this.resources.fetch<EventCallback>({ type: 'event_callbacks' }, `webhooks/${_webhookId}/last_event_callbacks`, params, options) as unknown as ListResponse<EventCallback>\n\t}\n\n\tasync versions(webhookId: string | Webhook, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _webhookId = (webhookId as Webhook).id || webhookId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `webhooks/${_webhookId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\tasync _disable(id: string | Webhook, params?: QueryParamsRetrieve<Webhook>, options?: ResourcesConfig): Promise<Webhook> {\n\t\treturn this.resources.update<WebhookUpdate, Webhook>({ id: (typeof id === 'string')? id: id.id, type: Webhooks.TYPE, _disable: true }, params, options)\n\t}\n\n\tasync _enable(id: string | Webhook, params?: QueryParamsRetrieve<Webhook>, options?: ResourcesConfig): Promise<Webhook> {\n\t\treturn this.resources.update<WebhookUpdate, Webhook>({ id: (typeof id === 'string')? id: id.id, type: Webhooks.TYPE, _enable: true }, params, options)\n\t}\n\n\tasync _reset_circuit(id: string | Webhook, params?: QueryParamsRetrieve<Webhook>, options?: ResourcesConfig): Promise<Webhook> {\n\t\treturn this.resources.update<WebhookUpdate, Webhook>({ id: (typeof id === 'string')? id: id.id, type: Webhooks.TYPE, _reset_circuit: true }, params, options)\n\t}\n\n\n\tisWebhook(resource: any): resource is Webhook {\n\t\treturn resource.type && (resource.type === Webhooks.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): WebhookRel {\n\t\treturn super.relationshipOneToOne<WebhookRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): WebhookRel[] {\n\t\treturn super.relationshipOneToMany<WebhookRel>(...ids)\n\t}\n\n\n\ttype(): WebhookType {\n\t\treturn Webhooks.TYPE\n\t}\n\n}\n\n\nexport default Webhooks\n\nexport type { Webhook, WebhookCreate, WebhookUpdate, WebhookType }\n","import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { Order, OrderType } from './orders'\nimport type { Version } from './versions'\n\n\ntype WireTransferType = 'wire_transfers'\ntype WireTransferRel = ResourceRel & { type: WireTransferType }\ntype OrderRel = ResourceRel & { type: OrderType }\n\n\nexport type WireTransferSort = Pick<WireTransfer, 'id'> & ResourceSort\n// export type WireTransferFilter = Pick<WireTransfer, 'id'> & ResourceFilter\n\n\ninterface WireTransfer extends Resource {\n\t\n\treadonly type: WireTransferType\n\n\tpayment_instrument?: Record<string, any> | null\n\n\torder?: Order | null\n\tversions?: Version[] | null\n\n}\n\n\ninterface WireTransferCreate extends ResourceCreate {\n\t\n\torder: OrderRel\n\n}\n\n\ninterface WireTransferUpdate extends ResourceUpdate {\n\t\n\torder?: OrderRel | null\n\n}\n\n\nclass WireTransfers extends ApiResource<WireTransfer> {\n\n\tstatic readonly TYPE: WireTransferType = 'wire_transfers' as const\n\n\tasync create(resource: WireTransferCreate, params?: QueryParamsRetrieve<WireTransfer>, options?: ResourcesConfig): Promise<WireTransfer> {\n\t\treturn this.resources.create<WireTransferCreate, WireTransfer>({ ...resource, type: WireTransfers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: WireTransferUpdate, params?: QueryParamsRetrieve<WireTransfer>, options?: ResourcesConfig): Promise<WireTransfer> {\n\t\treturn this.resources.update<WireTransferUpdate, WireTransfer>({ ...resource, type: WireTransfers.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: WireTransfers.TYPE } : id, options)\n\t}\n\n\tasync order(wireTransferId: string | WireTransfer, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order> {\n\t\tconst _wireTransferId = (wireTransferId as WireTransfer).id || wireTransferId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `wire_transfers/${_wireTransferId}/order`, params, options) as unknown as Order\n\t}\n\n\tasync versions(wireTransferId: string | WireTransfer, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>> {\n\t\tconst _wireTransferId = (wireTransferId as WireTransfer).id || wireTransferId as string\n\t\treturn this.resources.fetch<Version>({ type: 'versions' }, `wire_transfers/${_wireTransferId}/versions`, params, options) as unknown as ListResponse<Version>\n\t}\n\n\n\tisWireTransfer(resource: any): resource is WireTransfer {\n\t\treturn resource.type && (resource.type === WireTransfers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): WireTransferRel {\n\t\treturn super.relationshipOneToOne<WireTransferRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): WireTransferRel[] {\n\t\treturn super.relationshipOneToMany<WireTransferRel>(...ids)\n\t}\n\n\n\ttype(): WireTransferType {\n\t\treturn WireTransfers.TYPE\n\t}\n\n}\n\n\nexport default WireTransfers\n\nexport type { WireTransfer, WireTransferCreate, WireTransferUpdate, WireTransferType }\n","import type { Resource, ResourceRel } from './resource'\nimport type { TagType } from './resources/tags'\nimport type { VersionType } from './resources/versions'\nimport type * as models from './model'\n\n// ##__API_RESOURCES_START__##\n// ##__API_RESOURCES_TEMPLATE:: export { default as ##__RESOURCE_CLASS__## } from './resources/##__RESOURCE_TYPE__##'\n/**\n * ©2024 Commerce Layer Inc.\n **/\nexport { default as Addresses } from './resources/addresses'\nexport { default as Adjustments } from './resources/adjustments'\nexport { default as AdyenGateways } from './resources/adyen_gateways'\nexport { default as AdyenPayments } from './resources/adyen_payments'\nexport { default as Applications } from './resources/application'\nexport { default as Attachments } from './resources/attachments'\nexport { default as Authorizations } from './resources/authorizations'\nexport { default as AvalaraAccounts } from './resources/avalara_accounts'\nexport { default as AxerveGateways } from './resources/axerve_gateways'\nexport { default as AxervePayments } from './resources/axerve_payments'\nexport { default as BillingInfoValidationRules } from './resources/billing_info_validation_rules'\nexport { default as BingGeocoders } from './resources/bing_geocoders'\nexport { default as BraintreeGateways } from './resources/braintree_gateways'\nexport { default as BraintreePayments } from './resources/braintree_payments'\nexport { default as Bundles } from './resources/bundles'\nexport { default as BuyXPayYPromotions } from './resources/buy_x_pay_y_promotions'\nexport { default as Captures } from './resources/captures'\nexport { default as CarrierAccounts } from './resources/carrier_accounts'\nexport { default as CheckoutComGateways } from './resources/checkout_com_gateways'\nexport { default as CheckoutComPayments } from './resources/checkout_com_payments'\nexport { default as Cleanups } from './resources/cleanups'\nexport { default as CouponCodesPromotionRules } from './resources/coupon_codes_promotion_rules'\nexport { default as CouponRecipients } from './resources/coupon_recipients'\nexport { default as Coupons } from './resources/coupons'\nexport { default as CustomPromotionRules } from './resources/custom_promotion_rules'\nexport { default as CustomerAddresses } from './resources/customer_addresses'\nexport { default as CustomerGroups } from './resources/customer_groups'\nexport { default as CustomerPasswordResets } from './resources/customer_password_resets'\nexport { default as CustomerPaymentSources } from './resources/customer_payment_sources'\nexport { default as CustomerSubscriptions } from './resources/customer_subscriptions'\nexport { default as Customers } from './resources/customers'\nexport { default as DeliveryLeadTimes } from './resources/delivery_lead_times'\nexport { default as EventCallbacks } from './resources/event_callbacks'\nexport { default as Events } from './resources/events'\nexport { default as Exports } from './resources/exports'\nexport { default as ExternalGateways } from './resources/external_gateways'\nexport { default as ExternalPayments } from './resources/external_payments'\nexport { default as ExternalPromotions } from './resources/external_promotions'\nexport { default as ExternalTaxCalculators } from './resources/external_tax_calculators'\nexport { default as FixedAmountPromotions } from './resources/fixed_amount_promotions'\nexport { default as FixedPricePromotions } from './resources/fixed_price_promotions'\nexport { default as FreeGiftPromotions } from './resources/free_gift_promotions'\nexport { default as FreeShippingPromotions } from './resources/free_shipping_promotions'\nexport { default as Geocoders } from './resources/geocoders'\nexport { default as GiftCardRecipients } from './resources/gift_card_recipients'\nexport { default as GiftCards } from './resources/gift_cards'\nexport { default as GoogleGeocoders } from './resources/google_geocoders'\nexport { default as Imports } from './resources/imports'\nexport { default as InStockSubscriptions } from './resources/in_stock_subscriptions'\nexport { default as InventoryModels } from './resources/inventory_models'\nexport { default as InventoryReturnLocations } from './resources/inventory_return_locations'\nexport { default as InventoryStockLocations } from './resources/inventory_stock_locations'\nexport { default as KlarnaGateways } from './resources/klarna_gateways'\nexport { default as KlarnaPayments } from './resources/klarna_payments'\nexport { default as LineItemOptions } from './resources/line_item_options'\nexport { default as LineItems } from './resources/line_items'\nexport { default as ManualGateways } from './resources/manual_gateways'\nexport { default as ManualTaxCalculators } from './resources/manual_tax_calculators'\nexport { default as Markets } from './resources/markets'\nexport { default as Merchants } from './resources/merchants'\nexport { default as OrderAmountPromotionRules } from './resources/order_amount_promotion_rules'\nexport { default as OrderCopies } from './resources/order_copies'\nexport { default as OrderFactories } from './resources/order_factories'\nexport { default as OrderSubscriptionItems } from './resources/order_subscription_items'\nexport { default as OrderSubscriptions } from './resources/order_subscriptions'\nexport { default as OrderValidationRules } from './resources/order_validation_rules'\nexport { default as Orders } from './resources/orders'\nexport { default as Organizations } from './resources/organization'\nexport { default as Packages } from './resources/packages'\nexport { default as ParcelLineItems } from './resources/parcel_line_items'\nexport { default as Parcels } from './resources/parcels'\nexport { default as PaymentGateways } from './resources/payment_gateways'\nexport { default as PaymentMethods } from './resources/payment_methods'\nexport { default as PaymentOptions } from './resources/payment_options'\nexport { default as PaypalGateways } from './resources/paypal_gateways'\nexport { default as PaypalPayments } from './resources/paypal_payments'\nexport { default as PercentageDiscountPromotions } from './resources/percentage_discount_promotions'\nexport { default as PriceFrequencyTiers } from './resources/price_frequency_tiers'\nexport { default as PriceLists } from './resources/price_lists'\nexport { default as PriceTiers } from './resources/price_tiers'\nexport { default as PriceVolumeTiers } from './resources/price_volume_tiers'\nexport { default as Prices } from './resources/prices'\nexport { default as PromotionRules } from './resources/promotion_rules'\nexport { default as Promotions } from './resources/promotions'\nexport { default as RecurringOrderCopies } from './resources/recurring_order_copies'\nexport { default as Refunds } from './resources/refunds'\nexport { default as ReservedStocks } from './resources/reserved_stocks'\nexport { default as ResourceErrors } from './resources/resource_errors'\nexport { default as ReturnLineItems } from './resources/return_line_items'\nexport { default as Returns } from './resources/returns'\nexport { default as SatispayGateways } from './resources/satispay_gateways'\nexport { default as SatispayPayments } from './resources/satispay_payments'\nexport { default as Shipments } from './resources/shipments'\nexport { default as ShippingCategories } from './resources/shipping_categories'\nexport { default as ShippingMethodTiers } from './resources/shipping_method_tiers'\nexport { default as ShippingMethods } from './resources/shipping_methods'\nexport { default as ShippingWeightTiers } from './resources/shipping_weight_tiers'\nexport { default as ShippingZones } from './resources/shipping_zones'\nexport { default as SkuListItems } from './resources/sku_list_items'\nexport { default as SkuListPromotionRules } from './resources/sku_list_promotion_rules'\nexport { default as SkuLists } from './resources/sku_lists'\nexport { default as SkuOptions } from './resources/sku_options'\nexport { default as Skus } from './resources/skus'\nexport { default as StockItems } from './resources/stock_items'\nexport { default as StockLineItems } from './resources/stock_line_items'\nexport { default as StockLocations } from './resources/stock_locations'\nexport { default as StockReservations } from './resources/stock_reservations'\nexport { default as StockTransfers } from './resources/stock_transfers'\nexport { default as StripeGateways } from './resources/stripe_gateways'\nexport { default as StripePayments } from './resources/stripe_payments'\nexport { default as SubscriptionModels } from './resources/subscription_models'\nexport { default as Tags } from './resources/tags'\nexport { default as TaxCalculators } from './resources/tax_calculators'\nexport { default as TaxCategories } from './resources/tax_categories'\nexport { default as TaxRules } from './resources/tax_rules'\nexport { default as TaxjarAccounts } from './resources/taxjar_accounts'\nexport { default as Transactions } from './resources/transactions'\nexport { default as Versions } from './resources/versions'\nexport { default as Voids } from './resources/voids'\nexport { default as Webhooks } from './resources/webhooks'\nexport { default as WireTransfers } from './resources/wire_transfers'\n// ##__API_RESOURCES_STOP__##\n\n\nexport type ResourceTypeLock =\n\t// ##__API_RESOURCE_TYPES_START__##\n\t'addresses'\n|\t'adjustments'\n|\t'adyen_gateways'\n|\t'adyen_payments'\n|\t'application'\n|\t'attachments'\n|\t'authorizations'\n|\t'avalara_accounts'\n|\t'axerve_gateways'\n|\t'axerve_payments'\n|\t'billing_info_validation_rules'\n|\t'bing_geocoders'\n|\t'braintree_gateways'\n|\t'braintree_payments'\n|\t'bundles'\n|\t'buy_x_pay_y_promotions'\n|\t'captures'\n|\t'carrier_accounts'\n|\t'checkout_com_gateways'\n|\t'checkout_com_payments'\n|\t'cleanups'\n|\t'coupon_codes_promotion_rules'\n|\t'coupon_recipients'\n|\t'coupons'\n|\t'custom_promotion_rules'\n|\t'customer_addresses'\n|\t'customer_groups'\n|\t'customer_password_resets'\n|\t'customer_payment_sources'\n|\t'customer_subscriptions'\n|\t'customers'\n|\t'delivery_lead_times'\n|\t'event_callbacks'\n|\t'events'\n|\t'exports'\n|\t'external_gateways'\n|\t'external_payments'\n|\t'external_promotions'\n|\t'external_tax_calculators'\n|\t'fixed_amount_promotions'\n|\t'fixed_price_promotions'\n|\t'free_gift_promotions'\n|\t'free_shipping_promotions'\n|\t'geocoders'\n|\t'gift_card_recipients'\n|\t'gift_cards'\n|\t'google_geocoders'\n|\t'imports'\n|\t'in_stock_subscriptions'\n|\t'inventory_models'\n|\t'inventory_return_locations'\n|\t'inventory_stock_locations'\n|\t'klarna_gateways'\n|\t'klarna_payments'\n|\t'line_item_options'\n|\t'line_items'\n|\t'manual_gateways'\n|\t'manual_tax_calculators'\n|\t'markets'\n|\t'merchants'\n|\t'order_amount_promotion_rules'\n|\t'order_copies'\n|\t'order_factories'\n|\t'order_subscription_items'\n|\t'order_subscriptions'\n|\t'order_validation_rules'\n|\t'orders'\n|\t'organization'\n|\t'packages'\n|\t'parcel_line_items'\n|\t'parcels'\n|\t'payment_gateways'\n|\t'payment_methods'\n|\t'payment_options'\n|\t'paypal_gateways'\n|\t'paypal_payments'\n|\t'percentage_discount_promotions'\n|\t'price_frequency_tiers'\n|\t'price_lists'\n|\t'price_tiers'\n|\t'price_volume_tiers'\n|\t'prices'\n|\t'promotion_rules'\n|\t'promotions'\n|\t'recurring_order_copies'\n|\t'refunds'\n|\t'reserved_stocks'\n|\t'resource_errors'\n|\t'return_line_items'\n|\t'returns'\n|\t'satispay_gateways'\n|\t'satispay_payments'\n|\t'shipments'\n|\t'shipping_categories'\n|\t'shipping_method_tiers'\n|\t'shipping_methods'\n|\t'shipping_weight_tiers'\n|\t'shipping_zones'\n|\t'sku_list_items'\n|\t'sku_list_promotion_rules'\n|\t'sku_lists'\n|\t'sku_options'\n|\t'skus'\n|\t'stock_items'\n|\t'stock_line_items'\n|\t'stock_locations'\n|\t'stock_reservations'\n|\t'stock_transfers'\n|\t'stripe_gateways'\n|\t'stripe_payments'\n|\t'subscription_models'\n|\t'tags'\n|\t'tax_calculators'\n|\t'tax_categories'\n|\t'tax_rules'\n|\t'taxjar_accounts'\n|\t'transactions'\n|\t'versions'\n|\t'voids'\n|\t'webhooks'\n|\t'wire_transfers'\n// ##__API_RESOURCE_TYPES_STOP__##\n\n\nexport const resourceList = [\n\t// ##__API_RESOURCE_LIST_START__##\n\t'addresses',\n\t'adjustments',\n\t'adyen_gateways',\n\t'adyen_payments',\n\t'application',\n\t'attachments',\n\t'authorizations',\n\t'avalara_accounts',\n\t'axerve_gateways',\n\t'axerve_payments',\n\t'billing_info_validation_rules',\n\t'bing_geocoders',\n\t'braintree_gateways',\n\t'braintree_payments',\n\t'bundles',\n\t'buy_x_pay_y_promotions',\n\t'captures',\n\t'carrier_accounts',\n\t'checkout_com_gateways',\n\t'checkout_com_payments',\n\t'cleanups',\n\t'coupon_codes_promotion_rules',\n\t'coupon_recipients',\n\t'coupons',\n\t'custom_promotion_rules',\n\t'customer_addresses',\n\t'customer_groups',\n\t'customer_password_resets',\n\t'customer_payment_sources',\n\t'customer_subscriptions',\n\t'customers',\n\t'delivery_lead_times',\n\t'event_callbacks',\n\t'events',\n\t'exports',\n\t'external_gateways',\n\t'external_payments',\n\t'external_promotions',\n\t'external_tax_calculators',\n\t'fixed_amount_promotions',\n\t'fixed_price_promotions',\n\t'free_gift_promotions',\n\t'free_shipping_promotions',\n\t'geocoders',\n\t'gift_card_recipients',\n\t'gift_cards',\n\t'google_geocoders',\n\t'imports',\n\t'in_stock_subscriptions',\n\t'inventory_models',\n\t'inventory_return_locations',\n\t'inventory_stock_locations',\n\t'klarna_gateways',\n\t'klarna_payments',\n\t'line_item_options',\n\t'line_items',\n\t'manual_gateways',\n\t'manual_tax_calculators',\n\t'markets',\n\t'merchants',\n\t'order_amount_promotion_rules',\n\t'order_copies',\n\t'order_factories',\n\t'order_subscription_items',\n\t'order_subscriptions',\n\t'order_validation_rules',\n\t'orders',\n\t'organization',\n\t'packages',\n\t'parcel_line_items',\n\t'parcels',\n\t'payment_gateways',\n\t'payment_methods',\n\t'payment_options',\n\t'paypal_gateways',\n\t'paypal_payments',\n\t'percentage_discount_promotions',\n\t'price_frequency_tiers',\n\t'price_lists',\n\t'price_tiers',\n\t'price_volume_tiers',\n\t'prices',\n\t'promotion_rules',\n\t'promotions',\n\t'recurring_order_copies',\n\t'refunds',\n\t'reserved_stocks',\n\t'resource_errors',\n\t'return_line_items',\n\t'returns',\n\t'satispay_gateways',\n\t'satispay_payments',\n\t'shipments',\n\t'shipping_categories',\n\t'shipping_method_tiers',\n\t'shipping_methods',\n\t'shipping_weight_tiers',\n\t'shipping_zones',\n\t'sku_list_items',\n\t'sku_list_promotion_rules',\n\t'sku_lists',\n\t'sku_options',\n\t'skus',\n\t'stock_items',\n\t'stock_line_items',\n\t'stock_locations',\n\t'stock_reservations',\n\t'stock_transfers',\n\t'stripe_gateways',\n\t'stripe_payments',\n\t'subscription_models',\n\t'tags',\n\t'tax_calculators',\n\t'tax_categories',\n\t'tax_rules',\n\t'taxjar_accounts',\n\t'transactions',\n\t'versions',\n\t'voids',\n\t'webhooks',\n\t'wire_transfers'\n\t// ##__API_RESOURCE_LIST_STOP__##\n] as const\n\n\nexport const singletonList = [\n\t// ##__API_RESOURCE_SINGLETON_START__##\n\t'application',\n\t'organization'\n\t// ##__API_RESOURCE_SINGLETON_STOP__##\n] as const\n\n\n/*\ntype ResourceInfo = {\n\tname: string;\n\ttype: string;\n\tapi: string;\n}\n\n\nexport const resourceMap: { [res: string]: ResourceInfo } = {\n\t// ##__API_RESOURCE_MAP_START__##\n\t// ##__API_RESOURCE_MAP_STOP__##\n} as const\n*/\n\n\n// Retrievable resources\nexport type RetrievableResourceType = ResourceTypeLock\n\nexport type RetrievableResource = Resource & {\n\ttype: RetrievableResourceType\n}\n\n\n// Listable resources\nexport type ListableResourceType = Exclude<ResourceTypeLock,\n\t// ##__API_RESOURCE_NOT_LISTABLE_START__##\n\t'application'\n|\t'organization'\n// ##__API_RESOURCE_NOT_LISTABLE_STOP__##\n>\n\nexport type ListableResource = Resource & {\n\ttype: ListableResourceType\n}\n\n\n// Creatable resources\nexport type CreatableResourceType =\n\t// ##__API_RESOURCE_CREATABLE_START__##\n\t'addresses'\n|\t'adjustments'\n|\t'adyen_gateways'\n|\t'adyen_payments'\n|\t'attachments'\n|\t'avalara_accounts'\n|\t'axerve_gateways'\n|\t'axerve_payments'\n|\t'billing_info_validation_rules'\n|\t'bing_geocoders'\n|\t'braintree_gateways'\n|\t'braintree_payments'\n|\t'bundles'\n|\t'buy_x_pay_y_promotions'\n|\t'checkout_com_gateways'\n|\t'checkout_com_payments'\n|\t'cleanups'\n|\t'coupon_codes_promotion_rules'\n|\t'coupon_recipients'\n|\t'coupons'\n|\t'custom_promotion_rules'\n|\t'customer_addresses'\n|\t'customer_groups'\n|\t'customer_password_resets'\n|\t'customer_payment_sources'\n|\t'customer_subscriptions'\n|\t'customers'\n|\t'delivery_lead_times'\n|\t'exports'\n|\t'external_gateways'\n|\t'external_payments'\n|\t'external_promotions'\n|\t'external_tax_calculators'\n|\t'fixed_amount_promotions'\n|\t'fixed_price_promotions'\n|\t'free_gift_promotions'\n|\t'free_shipping_promotions'\n|\t'gift_card_recipients'\n|\t'gift_cards'\n|\t'google_geocoders'\n|\t'imports'\n|\t'in_stock_subscriptions'\n|\t'inventory_models'\n|\t'inventory_return_locations'\n|\t'inventory_stock_locations'\n|\t'klarna_gateways'\n|\t'klarna_payments'\n|\t'line_item_options'\n|\t'line_items'\n|\t'manual_gateways'\n|\t'manual_tax_calculators'\n|\t'markets'\n|\t'merchants'\n|\t'order_amount_promotion_rules'\n|\t'order_copies'\n|\t'order_subscription_items'\n|\t'order_subscriptions'\n|\t'orders'\n|\t'packages'\n|\t'parcel_line_items'\n|\t'parcels'\n|\t'payment_methods'\n|\t'payment_options'\n|\t'paypal_gateways'\n|\t'paypal_payments'\n|\t'percentage_discount_promotions'\n|\t'price_frequency_tiers'\n|\t'price_lists'\n|\t'price_volume_tiers'\n|\t'prices'\n|\t'recurring_order_copies'\n|\t'return_line_items'\n|\t'returns'\n|\t'satispay_gateways'\n|\t'satispay_payments'\n|\t'shipments'\n|\t'shipping_categories'\n|\t'shipping_methods'\n|\t'shipping_weight_tiers'\n|\t'shipping_zones'\n|\t'sku_list_items'\n|\t'sku_list_promotion_rules'\n|\t'sku_lists'\n|\t'sku_options'\n|\t'skus'\n|\t'stock_items'\n|\t'stock_line_items'\n|\t'stock_locations'\n|\t'stock_reservations'\n|\t'stock_transfers'\n|\t'stripe_gateways'\n|\t'stripe_payments'\n|\t'subscription_models'\n|\t'tags'\n|\t'tax_categories'\n|\t'tax_rules'\n|\t'taxjar_accounts'\n|\t'webhooks'\n|\t'wire_transfers'\n// ##__API_RESOURCE_CREATABLE_STOP__##\n\nexport type CreatableResource = Resource & {\n\ttype: CreatableResourceType\n}\n\n\n// Updatable resources\nexport type UpdatableResourceType =\n\t// ##__API_RESOURCE_UPDATABLE_START__##\n\t'addresses'\n|\t'adjustments'\n|\t'adyen_gateways'\n|\t'adyen_payments'\n|\t'attachments'\n|\t'authorizations'\n|\t'avalara_accounts'\n|\t'axerve_gateways'\n|\t'axerve_payments'\n|\t'billing_info_validation_rules'\n|\t'bing_geocoders'\n|\t'braintree_gateways'\n|\t'braintree_payments'\n|\t'bundles'\n|\t'buy_x_pay_y_promotions'\n|\t'captures'\n|\t'checkout_com_gateways'\n|\t'checkout_com_payments'\n|\t'coupon_codes_promotion_rules'\n|\t'coupon_recipients'\n|\t'coupons'\n|\t'custom_promotion_rules'\n|\t'customer_addresses'\n|\t'customer_groups'\n|\t'customer_password_resets'\n|\t'customer_payment_sources'\n|\t'customer_subscriptions'\n|\t'customers'\n|\t'delivery_lead_times'\n|\t'external_gateways'\n|\t'external_payments'\n|\t'external_promotions'\n|\t'external_tax_calculators'\n|\t'fixed_amount_promotions'\n|\t'fixed_price_promotions'\n|\t'free_gift_promotions'\n|\t'free_shipping_promotions'\n|\t'gift_card_recipients'\n|\t'gift_cards'\n|\t'google_geocoders'\n|\t'in_stock_subscriptions'\n|\t'inventory_models'\n|\t'inventory_return_locations'\n|\t'inventory_stock_locations'\n|\t'klarna_gateways'\n|\t'klarna_payments'\n|\t'line_item_options'\n|\t'line_items'\n|\t'manual_gateways'\n|\t'manual_tax_calculators'\n|\t'markets'\n|\t'merchants'\n|\t'order_amount_promotion_rules'\n|\t'order_copies'\n|\t'order_subscription_items'\n|\t'order_subscriptions'\n|\t'orders'\n|\t'packages'\n|\t'parcel_line_items'\n|\t'parcels'\n|\t'payment_methods'\n|\t'payment_options'\n|\t'paypal_gateways'\n|\t'paypal_payments'\n|\t'percentage_discount_promotions'\n|\t'price_frequency_tiers'\n|\t'price_lists'\n|\t'price_volume_tiers'\n|\t'prices'\n|\t'recurring_order_copies'\n|\t'return_line_items'\n|\t'returns'\n|\t'satispay_gateways'\n|\t'satispay_payments'\n|\t'shipments'\n|\t'shipping_categories'\n|\t'shipping_methods'\n|\t'shipping_weight_tiers'\n|\t'shipping_zones'\n|\t'sku_list_items'\n|\t'sku_list_promotion_rules'\n|\t'sku_lists'\n|\t'sku_options'\n|\t'skus'\n|\t'stock_items'\n|\t'stock_line_items'\n|\t'stock_locations'\n|\t'stock_reservations'\n|\t'stock_transfers'\n|\t'stripe_gateways'\n|\t'stripe_payments'\n|\t'subscription_models'\n|\t'tags'\n|\t'tax_categories'\n|\t'tax_rules'\n|\t'taxjar_accounts'\n|\t'webhooks'\n|\t'wire_transfers'\n// ##__API_RESOURCE_UPDATABLE_STOP__##\n\nexport type UpdatableResource = Resource & {\n\ttype: UpdatableResourceType\n}\n\n\n// Deletable resources\nexport type DeletableResourceType =\n\t// ##__API_RESOURCE_DELETABLE_START__##\n\t'addresses'\n|\t'adjustments'\n|\t'adyen_gateways'\n|\t'adyen_payments'\n|\t'attachments'\n|\t'avalara_accounts'\n|\t'axerve_gateways'\n|\t'axerve_payments'\n|\t'billing_info_validation_rules'\n|\t'bing_geocoders'\n|\t'braintree_gateways'\n|\t'braintree_payments'\n|\t'bundles'\n|\t'buy_x_pay_y_promotions'\n|\t'checkout_com_gateways'\n|\t'checkout_com_payments'\n|\t'cleanups'\n|\t'coupon_codes_promotion_rules'\n|\t'coupon_recipients'\n|\t'coupons'\n|\t'custom_promotion_rules'\n|\t'customer_addresses'\n|\t'customer_groups'\n|\t'customer_password_resets'\n|\t'customer_payment_sources'\n|\t'customer_subscriptions'\n|\t'customers'\n|\t'delivery_lead_times'\n|\t'exports'\n|\t'external_gateways'\n|\t'external_payments'\n|\t'external_promotions'\n|\t'external_tax_calculators'\n|\t'fixed_amount_promotions'\n|\t'fixed_price_promotions'\n|\t'free_gift_promotions'\n|\t'free_shipping_promotions'\n|\t'gift_card_recipients'\n|\t'gift_cards'\n|\t'google_geocoders'\n|\t'imports'\n|\t'in_stock_subscriptions'\n|\t'inventory_models'\n|\t'inventory_return_locations'\n|\t'inventory_stock_locations'\n|\t'klarna_gateways'\n|\t'klarna_payments'\n|\t'line_item_options'\n|\t'line_items'\n|\t'manual_gateways'\n|\t'manual_tax_calculators'\n|\t'markets'\n|\t'merchants'\n|\t'order_amount_promotion_rules'\n|\t'order_copies'\n|\t'order_subscription_items'\n|\t'order_subscriptions'\n|\t'orders'\n|\t'packages'\n|\t'parcel_line_items'\n|\t'parcels'\n|\t'payment_methods'\n|\t'payment_options'\n|\t'paypal_gateways'\n|\t'paypal_payments'\n|\t'percentage_discount_promotions'\n|\t'price_frequency_tiers'\n|\t'price_lists'\n|\t'price_volume_tiers'\n|\t'prices'\n|\t'recurring_order_copies'\n|\t'return_line_items'\n|\t'returns'\n|\t'satispay_gateways'\n|\t'satispay_payments'\n|\t'shipments'\n|\t'shipping_categories'\n|\t'shipping_methods'\n|\t'shipping_weight_tiers'\n|\t'shipping_zones'\n|\t'sku_list_items'\n|\t'sku_list_promotion_rules'\n|\t'sku_lists'\n|\t'sku_options'\n|\t'skus'\n|\t'stock_items'\n|\t'stock_line_items'\n|\t'stock_locations'\n|\t'stock_reservations'\n|\t'stock_transfers'\n|\t'stripe_gateways'\n|\t'stripe_payments'\n|\t'subscription_models'\n|\t'tags'\n|\t'tax_categories'\n|\t'tax_rules'\n|\t'taxjar_accounts'\n|\t'webhooks'\n|\t'wire_transfers'\n// ##__API_RESOURCE_DELETABLE_STOP__##\n\nexport type DeletableResource = Resource & {\n\ttype: DeletableResourceType\n}\n\n\n// Taggable resources\nexport type TaggableResourceType =\n\t// ##__API_RESOURCE_TAGGABLE_START__##\n\t'addresses'\n|\t'bundles'\n|\t'buy_x_pay_y_promotions'\n|\t'coupons'\n|\t'customers'\n|\t'external_promotions'\n|\t'fixed_amount_promotions'\n|\t'fixed_price_promotions'\n|\t'free_gift_promotions'\n|\t'free_shipping_promotions'\n|\t'gift_cards'\n|\t'line_item_options'\n|\t'line_items'\n|\t'orders'\n|\t'percentage_discount_promotions'\n|\t'promotions'\n|\t'returns'\n|\t'shipments'\n|\t'sku_options'\n|\t'skus'\n// ##__API_RESOURCE_TAGGABLE_STOP__##\n\nexport type TaggableResource = Resource & {\n\ttype: TaggableResourceType,\n\ttags?: Array<ResourceRel & { type: TagType }> | null\n}\n\n\n// Versionable resources\nexport type VersionableResourceType =\n\t// ##__API_RESOURCE_VERSIONABLE_START__##\n\t'addresses'\n|\t'adjustments'\n|\t'adyen_gateways'\n|\t'adyen_payments'\n|\t'authorizations'\n|\t'avalara_accounts'\n|\t'axerve_gateways'\n|\t'axerve_payments'\n|\t'billing_info_validation_rules'\n|\t'braintree_gateways'\n|\t'braintree_payments'\n|\t'bundles'\n|\t'buy_x_pay_y_promotions'\n|\t'captures'\n|\t'carrier_accounts'\n|\t'checkout_com_gateways'\n|\t'checkout_com_payments'\n|\t'cleanups'\n|\t'coupon_codes_promotion_rules'\n|\t'coupon_recipients'\n|\t'coupons'\n|\t'custom_promotion_rules'\n|\t'customer_addresses'\n|\t'customer_groups'\n|\t'customer_payment_sources'\n|\t'customer_subscriptions'\n|\t'delivery_lead_times'\n|\t'external_gateways'\n|\t'external_payments'\n|\t'external_promotions'\n|\t'external_tax_calculators'\n|\t'fixed_amount_promotions'\n|\t'fixed_price_promotions'\n|\t'free_gift_promotions'\n|\t'free_shipping_promotions'\n|\t'gift_card_recipients'\n|\t'gift_cards'\n|\t'in_stock_subscriptions'\n|\t'inventory_models'\n|\t'inventory_return_locations'\n|\t'inventory_stock_locations'\n|\t'klarna_gateways'\n|\t'klarna_payments'\n|\t'manual_gateways'\n|\t'manual_tax_calculators'\n|\t'markets'\n|\t'merchants'\n|\t'order_amount_promotion_rules'\n|\t'order_subscriptions'\n|\t'order_validation_rules'\n|\t'orders'\n|\t'packages'\n|\t'parcel_line_items'\n|\t'parcels'\n|\t'payment_gateways'\n|\t'payment_methods'\n|\t'paypal_gateways'\n|\t'paypal_payments'\n|\t'percentage_discount_promotions'\n|\t'price_frequency_tiers'\n|\t'price_lists'\n|\t'price_tiers'\n|\t'price_volume_tiers'\n|\t'prices'\n|\t'promotion_rules'\n|\t'promotions'\n|\t'refunds'\n|\t'returns'\n|\t'satispay_gateways'\n|\t'satispay_payments'\n|\t'shipments'\n|\t'shipping_categories'\n|\t'shipping_method_tiers'\n|\t'shipping_methods'\n|\t'shipping_weight_tiers'\n|\t'shipping_zones'\n|\t'sku_list_items'\n|\t'sku_list_promotion_rules'\n|\t'sku_lists'\n|\t'sku_options'\n|\t'skus'\n|\t'stock_items'\n|\t'stock_line_items'\n|\t'stock_locations'\n|\t'stock_transfers'\n|\t'stripe_gateways'\n|\t'stripe_payments'\n|\t'tax_calculators'\n|\t'tax_categories'\n|\t'tax_rules'\n|\t'taxjar_accounts'\n|\t'transactions'\n|\t'voids'\n|\t'webhooks'\n|\t'wire_transfers'\n// ##__API_RESOURCE_VERSIONABLE_STOP__##\n\nexport type VersionableResource = Resource & {\n\ttype: VersionableResourceType,\n\tversions?: Array<ResourceRel & { type: VersionType }> | null\n}\n\n\n\nexport type ResourceFields = {\n\t// ##__API_RESOURCE_FIELDS_START__##\n\taddresses: models.Address,\n\tadjustments: models.Adjustment,\n\tadyen_gateways: models.AdyenGateway,\n\tadyen_payments: models.AdyenPayment,\n\tapplication: models.Application,\n\tattachments: models.Attachment,\n\tauthorizations: models.Authorization,\n\tavalara_accounts: models.AvalaraAccount,\n\taxerve_gateways: models.AxerveGateway,\n\taxerve_payments: models.AxervePayment,\n\tbilling_info_validation_rules: models.BillingInfoValidationRule,\n\tbing_geocoders: models.BingGeocoder,\n\tbraintree_gateways: models.BraintreeGateway,\n\tbraintree_payments: models.BraintreePayment,\n\tbundles: models.Bundle,\n\tbuy_x_pay_y_promotions: models.BuyXPayYPromotion,\n\tcaptures: models.Capture,\n\tcarrier_accounts: models.CarrierAccount,\n\tcheckout_com_gateways: models.CheckoutComGateway,\n\tcheckout_com_payments: models.CheckoutComPayment,\n\tcleanups: models.Cleanup,\n\tcoupon_codes_promotion_rules: models.CouponCodesPromotionRule,\n\tcoupon_recipients: models.CouponRecipient,\n\tcoupons: models.Coupon,\n\tcustom_promotion_rules: models.CustomPromotionRule,\n\tcustomer_addresses: models.CustomerAddress,\n\tcustomer_groups: models.CustomerGroup,\n\tcustomer_password_resets: models.CustomerPasswordReset,\n\tcustomer_payment_sources: models.CustomerPaymentSource,\n\tcustomer_subscriptions: models.CustomerSubscription,\n\tcustomers: models.Customer,\n\tdelivery_lead_times: models.DeliveryLeadTime,\n\tevent_callbacks: models.EventCallback,\n\tevents: models.Event,\n\texports: models.Export,\n\texternal_gateways: models.ExternalGateway,\n\texternal_payments: models.ExternalPayment,\n\texternal_promotions: models.ExternalPromotion,\n\texternal_tax_calculators: models.ExternalTaxCalculator,\n\tfixed_amount_promotions: models.FixedAmountPromotion,\n\tfixed_price_promotions: models.FixedPricePromotion,\n\tfree_gift_promotions: models.FreeGiftPromotion,\n\tfree_shipping_promotions: models.FreeShippingPromotion,\n\tgeocoders: models.Geocoder,\n\tgift_card_recipients: models.GiftCardRecipient,\n\tgift_cards: models.GiftCard,\n\tgoogle_geocoders: models.GoogleGeocoder,\n\timports: models.Import,\n\tin_stock_subscriptions: models.InStockSubscription,\n\tinventory_models: models.InventoryModel,\n\tinventory_return_locations: models.InventoryReturnLocation,\n\tinventory_stock_locations: models.InventoryStockLocation,\n\tklarna_gateways: models.KlarnaGateway,\n\tklarna_payments: models.KlarnaPayment,\n\tline_item_options: models.LineItemOption,\n\tline_items: models.LineItem,\n\tmanual_gateways: models.ManualGateway,\n\tmanual_tax_calculators: models.ManualTaxCalculator,\n\tmarkets: models.Market,\n\tmerchants: models.Merchant,\n\torder_amount_promotion_rules: models.OrderAmountPromotionRule,\n\torder_copies: models.OrderCopy,\n\torder_factories: models.OrderFactory,\n\torder_subscription_items: models.OrderSubscriptionItem,\n\torder_subscriptions: models.OrderSubscription,\n\torder_validation_rules: models.OrderValidationRule,\n\torders: models.Order,\n\torganization: models.Organization,\n\tpackages: models.Package,\n\tparcel_line_items: models.ParcelLineItem,\n\tparcels: models.Parcel,\n\tpayment_gateways: models.PaymentGateway,\n\tpayment_methods: models.PaymentMethod,\n\tpayment_options: models.PaymentOption,\n\tpaypal_gateways: models.PaypalGateway,\n\tpaypal_payments: models.PaypalPayment,\n\tpercentage_discount_promotions: models.PercentageDiscountPromotion,\n\tprice_frequency_tiers: models.PriceFrequencyTier,\n\tprice_lists: models.PriceList,\n\tprice_tiers: models.PriceTier,\n\tprice_volume_tiers: models.PriceVolumeTier,\n\tprices: models.Price,\n\tpromotion_rules: models.PromotionRule,\n\tpromotions: models.Promotion,\n\trecurring_order_copies: models.RecurringOrderCopy,\n\trefunds: models.Refund,\n\treserved_stocks: models.ReservedStock,\n\tresource_errors: models.ResourceError,\n\treturn_line_items: models.ReturnLineItem,\n\treturns: models.Return,\n\tsatispay_gateways: models.SatispayGateway,\n\tsatispay_payments: models.SatispayPayment,\n\tshipments: models.Shipment,\n\tshipping_categories: models.ShippingCategory,\n\tshipping_method_tiers: models.ShippingMethodTier,\n\tshipping_methods: models.ShippingMethod,\n\tshipping_weight_tiers: models.ShippingWeightTier,\n\tshipping_zones: models.ShippingZone,\n\tsku_list_items: models.SkuListItem,\n\tsku_list_promotion_rules: models.SkuListPromotionRule,\n\tsku_lists: models.SkuList,\n\tsku_options: models.SkuOption,\n\tskus: models.Sku,\n\tstock_items: models.StockItem,\n\tstock_line_items: models.StockLineItem,\n\tstock_locations: models.StockLocation,\n\tstock_reservations: models.StockReservation,\n\tstock_transfers: models.StockTransfer,\n\tstripe_gateways: models.StripeGateway,\n\tstripe_payments: models.StripePayment,\n\tsubscription_models: models.SubscriptionModel,\n\ttags: models.Tag,\n\ttax_calculators: models.TaxCalculator,\n\ttax_categories: models.TaxCategory,\n\ttax_rules: models.TaxRule,\n\ttaxjar_accounts: models.TaxjarAccount,\n\ttransactions: models.Transaction,\n\tversions: models.Version,\n\tvoids: models.Void,\n\twebhooks: models.Webhook,\n\twire_transfers: models.WireTransfer\n\t// ##__API_RESOURCE_FIELDS_STOP__##\n}\n\n\nexport type ResourceSortFields = {\n\t// ##__API_RESOURCE_SORTABLE_FIELDS_START__##\n\taddresses: models.AddressSort,\n\tadjustments: models.AdjustmentSort,\n\tadyen_gateways: models.AdyenGatewaySort,\n\tadyen_payments: models.AdyenPaymentSort,\n\tapplication: models.ApplicationSort,\n\tattachments: models.AttachmentSort,\n\tauthorizations: models.AuthorizationSort,\n\tavalara_accounts: models.AvalaraAccountSort,\n\taxerve_gateways: models.AxerveGatewaySort,\n\taxerve_payments: models.AxervePaymentSort,\n\tbilling_info_validation_rules: models.BillingInfoValidationRuleSort,\n\tbing_geocoders: models.BingGeocoderSort,\n\tbraintree_gateways: models.BraintreeGatewaySort,\n\tbraintree_payments: models.BraintreePaymentSort,\n\tbundles: models.BundleSort,\n\tbuy_x_pay_y_promotions: models.BuyXPayYPromotionSort,\n\tcaptures: models.CaptureSort,\n\tcarrier_accounts: models.CarrierAccountSort,\n\tcheckout_com_gateways: models.CheckoutComGatewaySort,\n\tcheckout_com_payments: models.CheckoutComPaymentSort,\n\tcleanups: models.CleanupSort,\n\tcoupon_codes_promotion_rules: models.CouponCodesPromotionRuleSort,\n\tcoupon_recipients: models.CouponRecipientSort,\n\tcoupons: models.CouponSort,\n\tcustom_promotion_rules: models.CustomPromotionRuleSort,\n\tcustomer_addresses: models.CustomerAddressSort,\n\tcustomer_groups: models.CustomerGroupSort,\n\tcustomer_password_resets: models.CustomerPasswordResetSort,\n\tcustomer_payment_sources: models.CustomerPaymentSourceSort,\n\tcustomer_subscriptions: models.CustomerSubscriptionSort,\n\tcustomers: models.CustomerSort,\n\tdelivery_lead_times: models.DeliveryLeadTimeSort,\n\tevent_callbacks: models.EventCallbackSort,\n\tevents: models.EventSort,\n\texports: models.ExportSort,\n\texternal_gateways: models.ExternalGatewaySort,\n\texternal_payments: models.ExternalPaymentSort,\n\texternal_promotions: models.ExternalPromotionSort,\n\texternal_tax_calculators: models.ExternalTaxCalculatorSort,\n\tfixed_amount_promotions: models.FixedAmountPromotionSort,\n\tfixed_price_promotions: models.FixedPricePromotionSort,\n\tfree_gift_promotions: models.FreeGiftPromotionSort,\n\tfree_shipping_promotions: models.FreeShippingPromotionSort,\n\tgeocoders: models.GeocoderSort,\n\tgift_card_recipients: models.GiftCardRecipientSort,\n\tgift_cards: models.GiftCardSort,\n\tgoogle_geocoders: models.GoogleGeocoderSort,\n\timports: models.ImportSort,\n\tin_stock_subscriptions: models.InStockSubscriptionSort,\n\tinventory_models: models.InventoryModelSort,\n\tinventory_return_locations: models.InventoryReturnLocationSort,\n\tinventory_stock_locations: models.InventoryStockLocationSort,\n\tklarna_gateways: models.KlarnaGatewaySort,\n\tklarna_payments: models.KlarnaPaymentSort,\n\tline_item_options: models.LineItemOptionSort,\n\tline_items: models.LineItemSort,\n\tmanual_gateways: models.ManualGatewaySort,\n\tmanual_tax_calculators: models.ManualTaxCalculatorSort,\n\tmarkets: models.MarketSort,\n\tmerchants: models.MerchantSort,\n\torder_amount_promotion_rules: models.OrderAmountPromotionRuleSort,\n\torder_copies: models.OrderCopySort,\n\torder_factories: models.OrderFactorySort,\n\torder_subscription_items: models.OrderSubscriptionItemSort,\n\torder_subscriptions: models.OrderSubscriptionSort,\n\torder_validation_rules: models.OrderValidationRuleSort,\n\torders: models.OrderSort,\n\torganization: models.OrganizationSort,\n\tpackages: models.PackageSort,\n\tparcel_line_items: models.ParcelLineItemSort,\n\tparcels: models.ParcelSort,\n\tpayment_gateways: models.PaymentGatewaySort,\n\tpayment_methods: models.PaymentMethodSort,\n\tpayment_options: models.PaymentOptionSort,\n\tpaypal_gateways: models.PaypalGatewaySort,\n\tpaypal_payments: models.PaypalPaymentSort,\n\tpercentage_discount_promotions: models.PercentageDiscountPromotionSort,\n\tprice_frequency_tiers: models.PriceFrequencyTierSort,\n\tprice_lists: models.PriceListSort,\n\tprice_tiers: models.PriceTierSort,\n\tprice_volume_tiers: models.PriceVolumeTierSort,\n\tprices: models.PriceSort,\n\tpromotion_rules: models.PromotionRuleSort,\n\tpromotions: models.PromotionSort,\n\trecurring_order_copies: models.RecurringOrderCopySort,\n\trefunds: models.RefundSort,\n\treserved_stocks: models.ReservedStockSort,\n\tresource_errors: models.ResourceErrorSort,\n\treturn_line_items: models.ReturnLineItemSort,\n\treturns: models.ReturnSort,\n\tsatispay_gateways: models.SatispayGatewaySort,\n\tsatispay_payments: models.SatispayPaymentSort,\n\tshipments: models.ShipmentSort,\n\tshipping_categories: models.ShippingCategorySort,\n\tshipping_method_tiers: models.ShippingMethodTierSort,\n\tshipping_methods: models.ShippingMethodSort,\n\tshipping_weight_tiers: models.ShippingWeightTierSort,\n\tshipping_zones: models.ShippingZoneSort,\n\tsku_list_items: models.SkuListItemSort,\n\tsku_list_promotion_rules: models.SkuListPromotionRuleSort,\n\tsku_lists: models.SkuListSort,\n\tsku_options: models.SkuOptionSort,\n\tskus: models.SkuSort,\n\tstock_items: models.StockItemSort,\n\tstock_line_items: models.StockLineItemSort,\n\tstock_locations: models.StockLocationSort,\n\tstock_reservations: models.StockReservationSort,\n\tstock_transfers: models.StockTransferSort,\n\tstripe_gateways: models.StripeGatewaySort,\n\tstripe_payments: models.StripePaymentSort,\n\tsubscription_models: models.SubscriptionModelSort,\n\ttags: models.TagSort,\n\ttax_calculators: models.TaxCalculatorSort,\n\ttax_categories: models.TaxCategorySort,\n\ttax_rules: models.TaxRuleSort,\n\ttaxjar_accounts: models.TaxjarAccountSort,\n\ttransactions: models.TransactionSort,\n\tversions: models.VersionSort,\n\tvoids: models.VoidSort,\n\twebhooks: models.WebhookSort,\n\twire_transfers: models.WireTransferSort\n\t// ##__API_RESOURCE_SORTABLE_FIELDS_STOP__##\n}\n","\nimport * as api from './api'\nimport { SdkError, ApiError} from './error'\nimport CommerceLayer, { OPEN_API_SCHEMA_VERSION } from './commercelayer'\nimport type { CommerceLayerClient, CommerceLayerInitConfig } from './commercelayer'\n\n\n/* Static functions */\nexport const CommerceLayerStatic = {\n\n\tresources: (sort?: boolean): readonly string[] => {\n\t\treturn sort? [ ...api.resourceList ].sort() : api.resourceList\n\t},\n\n\tsingletons: (sort?: boolean): readonly string[] => {\n\t\treturn sort? [ ...api.singletonList ].sort() : api.singletonList\n\t},\n\n\tisSingleton: (resource: api.ResourceTypeLock): boolean => {\n\t\treturn (api.singletonList as unknown as api.ResourceTypeLock[]).includes(resource)\n\t},\n\n\tisSdkError: (error: unknown): error is SdkError => {\n\t\treturn SdkError.isSdkError(error)\n\t},\n\n\tisApiError: (error: unknown): error is ApiError => {\n\t\treturn ApiError.isApiError(error)\n\t},\n\n\tinit: (config: CommerceLayerInitConfig): CommerceLayerClient => {\n\t\treturn CommerceLayer(config)\n\t},\n\n\tget schemaVersion(): string { return OPEN_API_SCHEMA_VERSION }\n\n}\n","\nimport * as api from './api'\nimport type { ApiError } from './error'\nimport type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor, ResponseObj, HeadersObj, InterceptorManager } from './interceptor'\nimport { CommerceLayerStatic } from './static'\nimport ResourceAdapter, { type ResourcesInitConfig } from './resource'\n\nimport Debug from './debug'\nconst debug = Debug('commercelayer')\n\n\n// Autogenerated schema version number, do not remove this line\nconst OPEN_API_SCHEMA_VERSION = '5.2.0'\nexport { OPEN_API_SCHEMA_VERSION }\n\n\n// SDK local configuration\ntype SdkConfig = {\n\t// abc?: string\n}\n\ntype CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig\ntype CommerceLayerConfig = Partial<CommerceLayerInitConfig>\n\n\n\nclass CommerceLayerClient {\n\n\t// static get openApiSchemaVersion(): string { return OPEN_API_SCHEMA_VERSION }\n\treadonly openApiSchemaVersion = OPEN_API_SCHEMA_VERSION\n\n\treadonly #adapter: ResourceAdapter\n\t#slug: string\n\t// #environment: ApiMode = sdkConfig.default.environment\n\n\t// ##__CL_RESOURCES_DEF_START__##\n\t// ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##\n\t#addresses?: api.Addresses\n\t#adjustments?: api.Adjustments\n\t#adyen_gateways?: api.AdyenGateways\n\t#adyen_payments?: api.AdyenPayments\n\t#application?: api.Applications\n\t#attachments?: api.Attachments\n\t#authorizations?: api.Authorizations\n\t#avalara_accounts?: api.AvalaraAccounts\n\t#axerve_gateways?: api.AxerveGateways\n\t#axerve_payments?: api.AxervePayments\n\t#billing_info_validation_rules?: api.BillingInfoValidationRules\n\t#bing_geocoders?: api.BingGeocoders\n\t#braintree_gateways?: api.BraintreeGateways\n\t#braintree_payments?: api.BraintreePayments\n\t#bundles?: api.Bundles\n\t#buy_x_pay_y_promotions?: api.BuyXPayYPromotions\n\t#captures?: api.Captures\n\t#carrier_accounts?: api.CarrierAccounts\n\t#checkout_com_gateways?: api.CheckoutComGateways\n\t#checkout_com_payments?: api.CheckoutComPayments\n\t#cleanups?: api.Cleanups\n\t#coupon_codes_promotion_rules?: api.CouponCodesPromotionRules\n\t#coupon_recipients?: api.CouponRecipients\n\t#coupons?: api.Coupons\n\t#custom_promotion_rules?: api.CustomPromotionRules\n\t#customer_addresses?: api.CustomerAddresses\n\t#customer_groups?: api.CustomerGroups\n\t#customer_password_resets?: api.CustomerPasswordResets\n\t#customer_payment_sources?: api.CustomerPaymentSources\n\t#customer_subscriptions?: api.CustomerSubscriptions\n\t#customers?: api.Customers\n\t#delivery_lead_times?: api.DeliveryLeadTimes\n\t#event_callbacks?: api.EventCallbacks\n\t#events?: api.Events\n\t#exports?: api.Exports\n\t#external_gateways?: api.ExternalGateways\n\t#external_payments?: api.ExternalPayments\n\t#external_promotions?: api.ExternalPromotions\n\t#external_tax_calculators?: api.ExternalTaxCalculators\n\t#fixed_amount_promotions?: api.FixedAmountPromotions\n\t#fixed_price_promotions?: api.FixedPricePromotions\n\t#free_gift_promotions?: api.FreeGiftPromotions\n\t#free_shipping_promotions?: api.FreeShippingPromotions\n\t#geocoders?: api.Geocoders\n\t#gift_card_recipients?: api.GiftCardRecipients\n\t#gift_cards?: api.GiftCards\n\t#google_geocoders?: api.GoogleGeocoders\n\t#imports?: api.Imports\n\t#in_stock_subscriptions?: api.InStockSubscriptions\n\t#inventory_models?: api.InventoryModels\n\t#inventory_return_locations?: api.InventoryReturnLocations\n\t#inventory_stock_locations?: api.InventoryStockLocations\n\t#klarna_gateways?: api.KlarnaGateways\n\t#klarna_payments?: api.KlarnaPayments\n\t#line_item_options?: api.LineItemOptions\n\t#line_items?: api.LineItems\n\t#manual_gateways?: api.ManualGateways\n\t#manual_tax_calculators?: api.ManualTaxCalculators\n\t#markets?: api.Markets\n\t#merchants?: api.Merchants\n\t#order_amount_promotion_rules?: api.OrderAmountPromotionRules\n\t#order_copies?: api.OrderCopies\n\t#order_factories?: api.OrderFactories\n\t#order_subscription_items?: api.OrderSubscriptionItems\n\t#order_subscriptions?: api.OrderSubscriptions\n\t#order_validation_rules?: api.OrderValidationRules\n\t#orders?: api.Orders\n\t#organization?: api.Organizations\n\t#packages?: api.Packages\n\t#parcel_line_items?: api.ParcelLineItems\n\t#parcels?: api.Parcels\n\t#payment_gateways?: api.PaymentGateways\n\t#payment_methods?: api.PaymentMethods\n\t#payment_options?: api.PaymentOptions\n\t#paypal_gateways?: api.PaypalGateways\n\t#paypal_payments?: api.PaypalPayments\n\t#percentage_discount_promotions?: api.PercentageDiscountPromotions\n\t#price_frequency_tiers?: api.PriceFrequencyTiers\n\t#price_lists?: api.PriceLists\n\t#price_tiers?: api.PriceTiers\n\t#price_volume_tiers?: api.PriceVolumeTiers\n\t#prices?: api.Prices\n\t#promotion_rules?: api.PromotionRules\n\t#promotions?: api.Promotions\n\t#recurring_order_copies?: api.RecurringOrderCopies\n\t#refunds?: api.Refunds\n\t#reserved_stocks?: api.ReservedStocks\n\t#resource_errors?: api.ResourceErrors\n\t#return_line_items?: api.ReturnLineItems\n\t#returns?: api.Returns\n\t#satispay_gateways?: api.SatispayGateways\n\t#satispay_payments?: api.SatispayPayments\n\t#shipments?: api.Shipments\n\t#shipping_categories?: api.ShippingCategories\n\t#shipping_method_tiers?: api.ShippingMethodTiers\n\t#shipping_methods?: api.ShippingMethods\n\t#shipping_weight_tiers?: api.ShippingWeightTiers\n\t#shipping_zones?: api.ShippingZones\n\t#sku_list_items?: api.SkuListItems\n\t#sku_list_promotion_rules?: api.SkuListPromotionRules\n\t#sku_lists?: api.SkuLists\n\t#sku_options?: api.SkuOptions\n\t#skus?: api.Skus\n\t#stock_items?: api.StockItems\n\t#stock_line_items?: api.StockLineItems\n\t#stock_locations?: api.StockLocations\n\t#stock_reservations?: api.StockReservations\n\t#stock_transfers?: api.StockTransfers\n\t#stripe_gateways?: api.StripeGateways\n\t#stripe_payments?: api.StripePayments\n\t#subscription_models?: api.SubscriptionModels\n\t#tags?: api.Tags\n\t#tax_calculators?: api.TaxCalculators\n\t#tax_categories?: api.TaxCategories\n\t#tax_rules?: api.TaxRules\n\t#taxjar_accounts?: api.TaxjarAccounts\n\t#transactions?: api.Transactions\n\t#versions?: api.Versions\n\t#voids?: api.Voids\n\t#webhooks?: api.Webhooks\n\t#wire_transfers?: api.WireTransfers\n\t// ##__CL_RESOURCES_DEF_STOP__##\n\n\n\tconstructor(config: CommerceLayerInitConfig) {\n\n\t\tdebug('new commercelayer instance %O', config)\n\n\t\tthis.#adapter = new ResourceAdapter(config)\n\t\tthis.#slug = config.organization\n\t\t// this.#environment = 'test'\n\n\t\t// ##__CL_RESOURCES_INIT_START__##\n\t\t// ##__CL_RESOURCES_INIT_TEMPLATE:: ##__TAB__####__TAB__##this.##__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)\n\t\t// ##__CL_RESOURCES_INIT_STOP__##\n\n\t}\n\n\t// ##__CL_RESOURCES_LEAZY_LOADING_START__##\n\t// ##__CL_RESOURCES_LEAZY_LOADING_TEMPLATE:: ##__TAB__##get ##__RESOURCE_TYPE__##(): api.##__RESOURCE_CLASS__## { return this.###__RESOURCE_TYPE__## || (this.###__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)) }\n\tget addresses(): api.Addresses { return this.#addresses || (this.#addresses = new api.Addresses(this.#adapter)) }\n\tget adjustments(): api.Adjustments { return this.#adjustments || (this.#adjustments = new api.Adjustments(this.#adapter)) }\n\tget adyen_gateways(): api.AdyenGateways { return this.#adyen_gateways || (this.#adyen_gateways = new api.AdyenGateways(this.#adapter)) }\n\tget adyen_payments(): api.AdyenPayments { return this.#adyen_payments || (this.#adyen_payments = new api.AdyenPayments(this.#adapter)) }\n\tget application(): api.Applications { return this.#application || (this.#application = new api.Applications(this.#adapter)) }\n\tget attachments(): api.Attachments { return this.#attachments || (this.#attachments = new api.Attachments(this.#adapter)) }\n\tget authorizations(): api.Authorizations { return this.#authorizations || (this.#authorizations = new api.Authorizations(this.#adapter)) }\n\tget avalara_accounts(): api.AvalaraAccounts { return this.#avalara_accounts || (this.#avalara_accounts = new api.AvalaraAccounts(this.#adapter)) }\n\tget axerve_gateways(): api.AxerveGateways { return this.#axerve_gateways || (this.#axerve_gateways = new api.AxerveGateways(this.#adapter)) }\n\tget axerve_payments(): api.AxervePayments { return this.#axerve_payments || (this.#axerve_payments = new api.AxervePayments(this.#adapter)) }\n\tget billing_info_validation_rules(): api.BillingInfoValidationRules { return this.#billing_info_validation_rules || (this.#billing_info_validation_rules = new api.BillingInfoValidationRules(this.#adapter)) }\n\tget bing_geocoders(): api.BingGeocoders { return this.#bing_geocoders || (this.#bing_geocoders = new api.BingGeocoders(this.#adapter)) }\n\tget braintree_gateways(): api.BraintreeGateways { return this.#braintree_gateways || (this.#braintree_gateways = new api.BraintreeGateways(this.#adapter)) }\n\tget braintree_payments(): api.BraintreePayments { return this.#braintree_payments || (this.#braintree_payments = new api.BraintreePayments(this.#adapter)) }\n\tget bundles(): api.Bundles { return this.#bundles || (this.#bundles = new api.Bundles(this.#adapter)) }\n\tget buy_x_pay_y_promotions(): api.BuyXPayYPromotions { return this.#buy_x_pay_y_promotions || (this.#buy_x_pay_y_promotions = new api.BuyXPayYPromotions(this.#adapter)) }\n\tget captures(): api.Captures { return this.#captures || (this.#captures = new api.Captures(this.#adapter)) }\n\tget carrier_accounts(): api.CarrierAccounts { return this.#carrier_accounts || (this.#carrier_accounts = new api.CarrierAccounts(this.#adapter)) }\n\tget checkout_com_gateways(): api.CheckoutComGateways { return this.#checkout_com_gateways || (this.#checkout_com_gateways = new api.CheckoutComGateways(this.#adapter)) }\n\tget checkout_com_payments(): api.CheckoutComPayments { return this.#checkout_com_payments || (this.#checkout_com_payments = new api.CheckoutComPayments(this.#adapter)) }\n\tget cleanups(): api.Cleanups { return this.#cleanups || (this.#cleanups = new api.Cleanups(this.#adapter)) }\n\tget coupon_codes_promotion_rules(): api.CouponCodesPromotionRules { return this.#coupon_codes_promotion_rules || (this.#coupon_codes_promotion_rules = new api.CouponCodesPromotionRules(this.#adapter)) }\n\tget coupon_recipients(): api.CouponRecipients { return this.#coupon_recipients || (this.#coupon_recipients = new api.CouponRecipients(this.#adapter)) }\n\tget coupons(): api.Coupons { return this.#coupons || (this.#coupons = new api.Coupons(this.#adapter)) }\n\tget custom_promotion_rules(): api.CustomPromotionRules { return this.#custom_promotion_rules || (this.#custom_promotion_rules = new api.CustomPromotionRules(this.#adapter)) }\n\tget customer_addresses(): api.CustomerAddresses { return this.#customer_addresses || (this.#customer_addresses = new api.CustomerAddresses(this.#adapter)) }\n\tget customer_groups(): api.CustomerGroups { return this.#customer_groups || (this.#customer_groups = new api.CustomerGroups(this.#adapter)) }\n\tget customer_password_resets(): api.CustomerPasswordResets { return this.#customer_password_resets || (this.#customer_password_resets = new api.CustomerPasswordResets(this.#adapter)) }\n\tget customer_payment_sources(): api.CustomerPaymentSources { return this.#customer_payment_sources || (this.#customer_payment_sources = new api.CustomerPaymentSources(this.#adapter)) }\n\tget customer_subscriptions(): api.CustomerSubscriptions { return this.#customer_subscriptions || (this.#customer_subscriptions = new api.CustomerSubscriptions(this.#adapter)) }\n\tget customers(): api.Customers { return this.#customers || (this.#customers = new api.Customers(this.#adapter)) }\n\tget delivery_lead_times(): api.DeliveryLeadTimes { return this.#delivery_lead_times || (this.#delivery_lead_times = new api.DeliveryLeadTimes(this.#adapter)) }\n\tget event_callbacks(): api.EventCallbacks { return this.#event_callbacks || (this.#event_callbacks = new api.EventCallbacks(this.#adapter)) }\n\tget events(): api.Events { return this.#events || (this.#events = new api.Events(this.#adapter)) }\n\tget exports(): api.Exports { return this.#exports || (this.#exports = new api.Exports(this.#adapter)) }\n\tget external_gateways(): api.ExternalGateways { return this.#external_gateways || (this.#external_gateways = new api.ExternalGateways(this.#adapter)) }\n\tget external_payments(): api.ExternalPayments { return this.#external_payments || (this.#external_payments = new api.ExternalPayments(this.#adapter)) }\n\tget external_promotions(): api.ExternalPromotions { return this.#external_promotions || (this.#external_promotions = new api.ExternalPromotions(this.#adapter)) }\n\tget external_tax_calculators(): api.ExternalTaxCalculators { return this.#external_tax_calculators || (this.#external_tax_calculators = new api.ExternalTaxCalculators(this.#adapter)) }\n\tget fixed_amount_promotions(): api.FixedAmountPromotions { return this.#fixed_amount_promotions || (this.#fixed_amount_promotions = new api.FixedAmountPromotions(this.#adapter)) }\n\tget fixed_price_promotions(): api.FixedPricePromotions { return this.#fixed_price_promotions || (this.#fixed_price_promotions = new api.FixedPricePromotions(this.#adapter)) }\n\tget free_gift_promotions(): api.FreeGiftPromotions { return this.#free_gift_promotions || (this.#free_gift_promotions = new api.FreeGiftPromotions(this.#adapter)) }\n\tget free_shipping_promotions(): api.FreeShippingPromotions { return this.#free_shipping_promotions || (this.#free_shipping_promotions = new api.FreeShippingPromotions(this.#adapter)) }\n\tget geocoders(): api.Geocoders { return this.#geocoders || (this.#geocoders = new api.Geocoders(this.#adapter)) }\n\tget gift_card_recipients(): api.GiftCardRecipients { return this.#gift_card_recipients || (this.#gift_card_recipients = new api.GiftCardRecipients(this.#adapter)) }\n\tget gift_cards(): api.GiftCards { return this.#gift_cards || (this.#gift_cards = new api.GiftCards(this.#adapter)) }\n\tget google_geocoders(): api.GoogleGeocoders { return this.#google_geocoders || (this.#google_geocoders = new api.GoogleGeocoders(this.#adapter)) }\n\tget imports(): api.Imports { return this.#imports || (this.#imports = new api.Imports(this.#adapter)) }\n\tget in_stock_subscriptions(): api.InStockSubscriptions { return this.#in_stock_subscriptions || (this.#in_stock_subscriptions = new api.InStockSubscriptions(this.#adapter)) }\n\tget inventory_models(): api.InventoryModels { return this.#inventory_models || (this.#inventory_models = new api.InventoryModels(this.#adapter)) }\n\tget inventory_return_locations(): api.InventoryReturnLocations { return this.#inventory_return_locations || (this.#inventory_return_locations = new api.InventoryReturnLocations(this.#adapter)) }\n\tget inventory_stock_locations(): api.InventoryStockLocations { return this.#inventory_stock_locations || (this.#inventory_stock_locations = new api.InventoryStockLocations(this.#adapter)) }\n\tget klarna_gateways(): api.KlarnaGateways { return this.#klarna_gateways || (this.#klarna_gateways = new api.KlarnaGateways(this.#adapter)) }\n\tget klarna_payments(): api.KlarnaPayments { return this.#klarna_payments || (this.#klarna_payments = new api.KlarnaPayments(this.#adapter)) }\n\tget line_item_options(): api.LineItemOptions { return this.#line_item_options || (this.#line_item_options = new api.LineItemOptions(this.#adapter)) }\n\tget line_items(): api.LineItems { return this.#line_items || (this.#line_items = new api.LineItems(this.#adapter)) }\n\tget manual_gateways(): api.ManualGateways { return this.#manual_gateways || (this.#manual_gateways = new api.ManualGateways(this.#adapter)) }\n\tget manual_tax_calculators(): api.ManualTaxCalculators { return this.#manual_tax_calculators || (this.#manual_tax_calculators = new api.ManualTaxCalculators(this.#adapter)) }\n\tget markets(): api.Markets { return this.#markets || (this.#markets = new api.Markets(this.#adapter)) }\n\tget merchants(): api.Merchants { return this.#merchants || (this.#merchants = new api.Merchants(this.#adapter)) }\n\tget order_amount_promotion_rules(): api.OrderAmountPromotionRules { return this.#order_amount_promotion_rules || (this.#order_amount_promotion_rules = new api.OrderAmountPromotionRules(this.#adapter)) }\n\tget order_copies(): api.OrderCopies { return this.#order_copies || (this.#order_copies = new api.OrderCopies(this.#adapter)) }\n\tget order_factories(): api.OrderFactories { return this.#order_factories || (this.#order_factories = new api.OrderFactories(this.#adapter)) }\n\tget order_subscription_items(): api.OrderSubscriptionItems { return this.#order_subscription_items || (this.#order_subscription_items = new api.OrderSubscriptionItems(this.#adapter)) }\n\tget order_subscriptions(): api.OrderSubscriptions { return this.#order_subscriptions || (this.#order_subscriptions = new api.OrderSubscriptions(this.#adapter)) }\n\tget order_validation_rules(): api.OrderValidationRules { return this.#order_validation_rules || (this.#order_validation_rules = new api.OrderValidationRules(this.#adapter)) }\n\tget orders(): api.Orders { return this.#orders || (this.#orders = new api.Orders(this.#adapter)) }\n\tget organization(): api.Organizations { return this.#organization || (this.#organization = new api.Organizations(this.#adapter)) }\n\tget packages(): api.Packages { return this.#packages || (this.#packages = new api.Packages(this.#adapter)) }\n\tget parcel_line_items(): api.ParcelLineItems { return this.#parcel_line_items || (this.#parcel_line_items = new api.ParcelLineItems(this.#adapter)) }\n\tget parcels(): api.Parcels { return this.#parcels || (this.#parcels = new api.Parcels(this.#adapter)) }\n\tget payment_gateways(): api.PaymentGateways { return this.#payment_gateways || (this.#payment_gateways = new api.PaymentGateways(this.#adapter)) }\n\tget payment_methods(): api.PaymentMethods { return this.#payment_methods || (this.#payment_methods = new api.PaymentMethods(this.#adapter)) }\n\tget payment_options(): api.PaymentOptions { return this.#payment_options || (this.#payment_options = new api.PaymentOptions(this.#adapter)) }\n\tget paypal_gateways(): api.PaypalGateways { return this.#paypal_gateways || (this.#paypal_gateways = new api.PaypalGateways(this.#adapter)) }\n\tget paypal_payments(): api.PaypalPayments { return this.#paypal_payments || (this.#paypal_payments = new api.PaypalPayments(this.#adapter)) }\n\tget percentage_discount_promotions(): api.PercentageDiscountPromotions { return this.#percentage_discount_promotions || (this.#percentage_discount_promotions = new api.PercentageDiscountPromotions(this.#adapter)) }\n\tget price_frequency_tiers(): api.PriceFrequencyTiers { return this.#price_frequency_tiers || (this.#price_frequency_tiers = new api.PriceFrequencyTiers(this.#adapter)) }\n\tget price_lists(): api.PriceLists { return this.#price_lists || (this.#price_lists = new api.PriceLists(this.#adapter)) }\n\tget price_tiers(): api.PriceTiers { return this.#price_tiers || (this.#price_tiers = new api.PriceTiers(this.#adapter)) }\n\tget price_volume_tiers(): api.PriceVolumeTiers { return this.#price_volume_tiers || (this.#price_volume_tiers = new api.PriceVolumeTiers(this.#adapter)) }\n\tget prices(): api.Prices { return this.#prices || (this.#prices = new api.Prices(this.#adapter)) }\n\tget promotion_rules(): api.PromotionRules { return this.#promotion_rules || (this.#promotion_rules = new api.PromotionRules(this.#adapter)) }\n\tget promotions(): api.Promotions { return this.#promotions || (this.#promotions = new api.Promotions(this.#adapter)) }\n\tget recurring_order_copies(): api.RecurringOrderCopies { return this.#recurring_order_copies || (this.#recurring_order_copies = new api.RecurringOrderCopies(this.#adapter)) }\n\tget refunds(): api.Refunds { return this.#refunds || (this.#refunds = new api.Refunds(this.#adapter)) }\n\tget reserved_stocks(): api.ReservedStocks { return this.#reserved_stocks || (this.#reserved_stocks = new api.ReservedStocks(this.#adapter)) }\n\tget resource_errors(): api.ResourceErrors { return this.#resource_errors || (this.#resource_errors = new api.ResourceErrors(this.#adapter)) }\n\tget return_line_items(): api.ReturnLineItems { return this.#return_line_items || (this.#return_line_items = new api.ReturnLineItems(this.#adapter)) }\n\tget returns(): api.Returns { return this.#returns || (this.#returns = new api.Returns(this.#adapter)) }\n\tget satispay_gateways(): api.SatispayGateways { return this.#satispay_gateways || (this.#satispay_gateways = new api.SatispayGateways(this.#adapter)) }\n\tget satispay_payments(): api.SatispayPayments { return this.#satispay_payments || (this.#satispay_payments = new api.SatispayPayments(this.#adapter)) }\n\tget shipments(): api.Shipments { return this.#shipments || (this.#shipments = new api.Shipments(this.#adapter)) }\n\tget shipping_categories(): api.ShippingCategories { return this.#shipping_categories || (this.#shipping_categories = new api.ShippingCategories(this.#adapter)) }\n\tget shipping_method_tiers(): api.ShippingMethodTiers { return this.#shipping_method_tiers || (this.#shipping_method_tiers = new api.ShippingMethodTiers(this.#adapter)) }\n\tget shipping_methods(): api.ShippingMethods { return this.#shipping_methods || (this.#shipping_methods = new api.ShippingMethods(this.#adapter)) }\n\tget shipping_weight_tiers(): api.ShippingWeightTiers { return this.#shipping_weight_tiers || (this.#shipping_weight_tiers = new api.ShippingWeightTiers(this.#adapter)) }\n\tget shipping_zones(): api.ShippingZones { return this.#shipping_zones || (this.#shipping_zones = new api.ShippingZones(this.#adapter)) }\n\tget sku_list_items(): api.SkuListItems { return this.#sku_list_items || (this.#sku_list_items = new api.SkuListItems(this.#adapter)) }\n\tget sku_list_promotion_rules(): api.SkuListPromotionRules { return this.#sku_list_promotion_rules || (this.#sku_list_promotion_rules = new api.SkuListPromotionRules(this.#adapter)) }\n\tget sku_lists(): api.SkuLists { return this.#sku_lists || (this.#sku_lists = new api.SkuLists(this.#adapter)) }\n\tget sku_options(): api.SkuOptions { return this.#sku_options || (this.#sku_options = new api.SkuOptions(this.#adapter)) }\n\tget skus(): api.Skus { return this.#skus || (this.#skus = new api.Skus(this.#adapter)) }\n\tget stock_items(): api.StockItems { return this.#stock_items || (this.#stock_items = new api.StockItems(this.#adapter)) }\n\tget stock_line_items(): api.StockLineItems { return this.#stock_line_items || (this.#stock_line_items = new api.StockLineItems(this.#adapter)) }\n\tget stock_locations(): api.StockLocations { return this.#stock_locations || (this.#stock_locations = new api.StockLocations(this.#adapter)) }\n\tget stock_reservations(): api.StockReservations { return this.#stock_reservations || (this.#stock_reservations = new api.StockReservations(this.#adapter)) }\n\tget stock_transfers(): api.StockTransfers { return this.#stock_transfers || (this.#stock_transfers = new api.StockTransfers(this.#adapter)) }\n\tget stripe_gateways(): api.StripeGateways { return this.#stripe_gateways || (this.#stripe_gateways = new api.StripeGateways(this.#adapter)) }\n\tget stripe_payments(): api.StripePayments { return this.#stripe_payments || (this.#stripe_payments = new api.StripePayments(this.#adapter)) }\n\tget subscription_models(): api.SubscriptionModels { return this.#subscription_models || (this.#subscription_models = new api.SubscriptionModels(this.#adapter)) }\n\tget tags(): api.Tags { return this.#tags || (this.#tags = new api.Tags(this.#adapter)) }\n\tget tax_calculators(): api.TaxCalculators { return this.#tax_calculators || (this.#tax_calculators = new api.TaxCalculators(this.#adapter)) }\n\tget tax_categories(): api.TaxCategories { return this.#tax_categories || (this.#tax_categories = new api.TaxCategories(this.#adapter)) }\n\tget tax_rules(): api.TaxRules { return this.#tax_rules || (this.#tax_rules = new api.TaxRules(this.#adapter)) }\n\tget taxjar_accounts(): api.TaxjarAccounts { return this.#taxjar_accounts || (this.#taxjar_accounts = new api.TaxjarAccounts(this.#adapter)) }\n\tget transactions(): api.Transactions { return this.#transactions || (this.#transactions = new api.Transactions(this.#adapter)) }\n\tget versions(): api.Versions { return this.#versions || (this.#versions = new api.Versions(this.#adapter)) }\n\tget voids(): api.Voids { return this.#voids || (this.#voids = new api.Voids(this.#adapter)) }\n\tget webhooks(): api.Webhooks { return this.#webhooks || (this.#webhooks = new api.Webhooks(this.#adapter)) }\n\tget wire_transfers(): api.WireTransfers { return this.#wire_transfers || (this.#wire_transfers = new api.WireTransfers(this.#adapter)) }\n\t// ##__CL_RESOURCES_LEAZY_LOADING_STOP__##\n\n\t\n\tget currentOrganization(): string { return this.#slug }\n\t// get currentAccessToken(): string { return this.#adapter?.clientInstance?.currentAccessToken}\n\t// get environment(): ApiMode { return this.#environment }\n\tprivate get interceptors(): InterceptorManager { return this.#adapter.client.interceptors }\n\n\n\tprivate localConfig(config: SdkConfig & { organization?: string }): void {\n\t\tif (config.organization) this.#slug = config.organization\n\t}\n\n\n\tconfig(config: CommerceLayerConfig): this {\n\n\t\tdebug('config %o', config)\n\n\t\t// CommerceLayer config\n\t\tthis.localConfig(config)\n\t\t// ResourceAdapter config\n\t\t// To rebuild baseUrl in client in case only the domain is defined\n\t\tif (!config.organization) config.organization = this.currentOrganization\n\t\tthis.#adapter.config(config)\n\n\t\treturn this\n\n\t}\n\n\t\n\tresources(): readonly string[] {\n\t\treturn CommerceLayerStatic.resources()\n\t}\n\n\tsingletons(): readonly string[] {\n\t\treturn CommerceLayerStatic.singletons()\n\t}\n\n\tisSingleton(resource: api.ResourceTypeLock): boolean {\n\t\treturn CommerceLayerStatic.isSingleton(resource)\n\t}\n\t\n\n\tisApiError(error: any): error is ApiError {\n\t\treturn CommerceLayerStatic.isApiError(error)\n\t}\n\n\n\taddRequestInterceptor(onSuccess?: RequestInterceptor, onFailure?: ErrorInterceptor): void {\n\t\tthis.interceptors.request = { onSuccess, onFailure }\n\t}\n\n\taddResponseInterceptor(onSuccess?: ResponseInterceptor, onFailure?: ErrorInterceptor): void {\n\t\tthis.interceptors.response = { onSuccess, onFailure }\n\t}\n\n\tremoveInterceptor(type: InterceptorType, id: number = 1): void {\n\t\tthis.interceptors[type] = undefined\n\t}\n\n\taddRawResponseReader(options?: { headers: boolean }): RawResponseReader {\n\n\t\tconst reader: RawResponseReader = {\n\t\t\tid: undefined,\n\t\t\trawResponse: undefined,\n\t\t\theaders: undefined,\n\t\t\tok: true\n\t\t}\n\n\t\tasync function rawResponseInterceptor(response: ResponseObj): Promise<ResponseObj> {\n\t\t\treader.rawResponse = await response?.clone().json().catch(() => {})\n\t\t\treader.ok = response.ok\n\t\t\tif (options?.headers) {\n\t\t\t\tconst ho: HeadersObj = {}\n\t\t\t\tresponse.headers.forEach((value, key) => { ho[key] = value })\n\t\t\t\treader.headers = ho\n\t\t\t}\n\t\t\treturn response\n\t\t}\n\t\t\n\t\t/* const interceptor = */this.interceptors.rawReader = { onSuccess: rawResponseInterceptor, onFailure: rawResponseInterceptor }\n\t\treader.id = 1 // interceptor\n\n\t\treturn reader\n\n\t}\n\n\tremoveRawResponseReader(/* reader: number | RawResponseReader */): void {\n\t\t/*\n\t\tconst id = (typeof reader === 'number') ? reader : reader?.id\n\t\tif (id && (id >= 0)) this.removeInterceptor('response', id)\n\t\t*/\n\t\tthis.interceptors.rawReader = undefined\n\t}\n\n}\n\n\n\nconst CommerceLayer = (config: CommerceLayerInitConfig): CommerceLayerClient => {\n\treturn new CommerceLayerClient(config)\n}\n\n\nexport default CommerceLayer\nexport { CommerceLayer }\n\nexport type { CommerceLayerClient, CommerceLayerCon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KAAyB,iBAF1C,IAAMS,GAANT,GAgDOU,GAAQD,GCyKR,IAAME,GAAe,CAE3B,YACA,cACA,iBACA,iBACA,cACA,cACA,iBACA,mBACA,kBACA,kBACA,gCACA,iBACA,qBACA,qBACA,UACA,yBACA,WACA,mBACA,wBACA,wBACA,WACA,+BACA,oBACA,UACA,yBACA,qBACA,kBACA,2BACA,2BACA,yBACA,YACA,sBACA,kBACA,SACA,UACA,oBACA,oBACA,sBACA,2BACA,0BACA,yBACA,uBACA,2BACA,YACA,uBACA,aACA,mBACA,UACA,yBACA,mBACA,6BACA,4BACA,kBACA,kBACA,oBACA,aACA,kBACA,yBACA,UACA,YACA,+BACA,eACA,kBACA,2BACA,sBACA,yBACA,SACA,eACA,WACA,oBACA,UACA,mBACA,kBACA,kBACA,kBACA,kBACA,iCACA,wBACA,cACA,cACA,qBACA,SACA,kBACA,aACA,yBACA,UACA,kBACA,kBACA,oBACA,UACA,oBACA,oBACA,YACA,sBACA,wBACA,mBACA,wBACA,iBACA,iBACA,2BACA,YACA,cACA,OACA,cACA,mBACA,kBACA,qBACA,kBACA,kBACA,kBACA,sBACA,OACA,kBACA,iBACA,YACA,kBACA,eACA,WACA,QACA,WACA,gBAED,EAGaC,GAAgB,CAE5B,cACA,cAED,EChYO,IAAMC,GAAsB,CAElC,UAAYC,GACJA,EAAM,CAAE,GAAOC,EAAa,EAAE,KAAK,EAAQA,GAGnD,WAAaD,GACLA,EAAM,CAAE,GAAOE,EAAc,EAAE,KAAK,EAAQA,GAGpD,YAAcC,GACDD,GAAoD,SAASC,CAAQ,EAGlF,WAAaC,GACLC,EAAS,WAAWD,CAAK,EAGjC,WAAaA,GACLE,GAAS,WAAWF,CAAK,EAGjC,KAAOG,GACCC,GAAcD,CAAM,EAG5B,IAAI,eAAwB,CAAE,OAAOE,EAAwB,CAE9D,EC5BA,IAAMC,GAAQC,EAAM,eAAe,EAI7BC,GAA0B,QAZhC,IAAAC,EAAAC,GAAAC,GAAAC,GAAAC,GAAA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AAA,YACAC,GAAA,YACAC,GAAA,YACAC,GAAA,YACAC,GAAA,YACAC,GAAA,YACAC,GAAA,YACAC,GAAA,YACAC,GAAA,YACAC,GAAA,YACAC,GAAA,YACAC,GAAA,YACAC,GAAA,YACAC,GAAA,YACAC,GAAA,YACAC,GAAA,YACAC,GAAA,YACAC,GAAA,YAgPD,IAAMgJ,GAAiB9I,GACf,IAAID,GAAoBC,CAAM,EAI/B+I,GAAQD","names":["debuggerFunction","_pattern","_args","debuggerFactory","_namespace","debugModule","debugPrefix","debug","namespace","debug_default","debug","debug_default","_errors","_status","_statusText","_FetchError","status","statusText","body","__privateAdd","__privateSet","__privateGet","error","FetchError","fetchURL","url","requestOptions","clientOptions","interceptors","response","responseBody","ErrorType","_SdkError","error","ApiError","SdkError","_ApiError","isRequestError","isCancelError","isTimeoutError","handleError","sdkError","FetchError","apiError","config","config_default","debug","debug_default","baseURL","organization","domain","config_default","_baseUrl","_accessToken","_clientConfig","_interceptors","_ApiClient","options","__privateAdd","__privateSet","fetchConfig","headers","__privateGet","userAgent","attr","SdkError","config","def","method","path","body","baseUrl","url","bodyData","accessToken","requestOptions","timeout","name","value","clientOptions","fetchURL","error","handleError","customHeaders","ApiClient","client_default","isResourceId","resource","resourceList","isResourceType","debug","debug_default","denormalize","response","denormalizedResponse","data","included","res","denormalizeResource","findIncluded","rel","inc","chain","resource","key","r","config_default","normalize","attributes","relationships","field","value","isResourceType","isResourceId","normalized","debug","debug_default","arrayFilters","objectFilters","isParamsList","params","generateQueryStringParams","res","qp","p","v","k","filter","val","SdkError","debug","debug_default","ListResponse","meta","data","index","_client","_config","ResourceAdapter","config","__privateAdd","__privateSet","client_default","debug","__privateGet","resource","params","options","queryParams","generateQueryStringParams","res","denormalize","r","meta","config_default","ListResponse","data","normalize","path","p","ApiResourceBase","adapter","id","ids","ApiResource","filter","isParamsList","response","ApiSingleton","resource_default","_Addresses","ApiResource","resource","params","options","id","addressId","_addressId","ids","Addresses","addresses_default","_Adjustments","ApiResource","resource","params","options","id","adjustmentId","_adjustmentId","ids","Adjustments","adjustments_default","_AdyenGateways","ApiResource","resource","params","options","id","adyenGatewayId","_adyenGatewayId","ids","AdyenGateways","adyen_gateways_default","_AdyenPayments","ApiResource","resource","params","options","id","adyenPaymentId","_adyenPaymentId","ids","AdyenPayments","adyen_payments_default","_Applications","ApiSingleton","resource","id","ids","Applications","application_default","_Attachments","ApiResource","resource","params","options","id","ids","Attachments","attachments_default","_Authorizations","ApiResource","resource","params","options","authorizationId","_authorizationId","id","triggerValue","ids","Authorizations","authorizations_default","_AvalaraAccounts","ApiResource","resource","params","options","id","avalaraAccountId","_avalaraAccountId","ids","AvalaraAccounts","avalara_accounts_default","_AxerveGateways","ApiResource","resource","params","options","id","axerveGatewayId","_axerveGatewayId","ids","AxerveGateways","axerve_gateways_default","_AxervePayments","ApiResource","resource","params","options","id","axervePaymentId","_axervePaymentId","ids","AxervePayments","axerve_payments_default","_BillingInfoValidationRules","ApiResource","resource","params","options","id","billingInfoValidationRuleId","_billingInfoValidationRuleId","ids","BillingInfoValidationRules","billing_info_validation_rules_default","_BingGeocoders","ApiResource","resource","params","options","id","bingGeocoderId","_bingGeocoderId","ids","BingGeocoders","bing_geocoders_default","_BraintreeGateways","ApiResource","resource","params","options","id","braintreeGatewayId","_braintreeGatewayId","ids","BraintreeGateways","braintree_gateways_default","_BraintreePayments","ApiResource","resource","params","options","id","braintreePaymentId","_braintreePaymentId","ids","BraintreePayments","braintree_payments_default","_Bundles","ApiResource","resource","params","options","id","bundleId","_bundleId","ids","Bundles","bundles_default","_BuyXPayYPromotions","ApiResource","resource","params","options","id","buyXPayYPromotionId","_buyXPayYPromotionId","ids","BuyXPayYPromotions","buy_x_pay_y_promotions_default","_Captures","ApiResource","resource","params","options","captureId","_captureId","id","triggerValue","ids","Captures","captures_default","_CarrierAccounts","ApiResource","carrierAccountId","params","options","_carrierAccountId","resource","id","ids","CarrierAccounts","carrier_accounts_default","_CheckoutComGateways","ApiResource","resource","params","options","id","checkoutComGatewayId","_checkoutComGatewayId","ids","CheckoutComGateways","checkout_com_gateways_default","_CheckoutComPayments","ApiResource","resource","params","options","id","checkoutComPaymentId","_checkoutComPaymentId","ids","CheckoutComPayments","checkout_com_payments_default","_Cleanups","ApiResource","resource","params","options","id","cleanupId","_cleanupId","ids","Cleanups","cleanups_default","_CouponCodesPromotionRules","ApiResource","resource","params","options","id","couponCodesPromotionRuleId","_couponCodesPromotionRuleId","ids","CouponCodesPromotionRules","coupon_codes_promotion_rules_default","_CouponRecipients","ApiResource","resource","params","options","id","couponRecipientId","_couponRecipientId","ids","CouponRecipients","coupon_recipients_default","_Coupons","ApiResource","resource","params","options","id","couponId","_couponId","ids","Coupons","coupons_default","_CustomPromotionRules","ApiResource","resource","params","options","id","customPromotionRuleId","_customPromotionRuleId","ids","CustomPromotionRules","custom_promotion_rules_default","_CustomerAddresses","ApiResource","resource","params","options","id","customerAddressId","_customerAddressId","ids","CustomerAddresses","customer_addresses_default","_CustomerGroups","ApiResource","resource","params","options","id","customerGroupId","_customerGroupId","ids","CustomerGroups","customer_groups_default","_CustomerPasswordResets","ApiResource","resource","params","options","id","customerPasswordResetId","_customerPasswordResetId","triggerValue","ids","CustomerPasswordResets","customer_password_resets_default","_CustomerPaymentSources","ApiResource","resource","params","options","id","customerPaymentSourceId","_customerPaymentSourceId","ids","CustomerPaymentSources","customer_payment_sources_default","_CustomerSubscriptions","ApiResource","resource","params","options","id","customerSubscriptionId","_customerSubscriptionId","ids","CustomerSubscriptions","customer_subscriptions_default","_Customers","ApiResource","resource","params","options","id","customerId","_customerId","ids","Customers","customers_default","_DeliveryLeadTimes","ApiResource","resource","params","options","id","deliveryLeadTimeId","_deliveryLeadTimeId","ids","DeliveryLeadTimes","delivery_lead_times_default","_EventCallbacks","ApiResource","eventCallbackId","params","options","_eventCallbackId","resource","id","ids","EventCallbacks","event_callbacks_default","_Events","ApiResource","eventId","params","options","_eventId","resource","id","ids","Events","events_default","_Exports","ApiResource","resource","params","options","id","exportId","_exportId","ids","Exports","exports_default","_ExternalGateways","ApiResource","resource","params","options","id","externalGatewayId","_externalGatewayId","ids","ExternalGateways","external_gateways_default","_ExternalPayments","ApiResource","resource","params","options","id","externalPaymentId","_externalPaymentId","ids","ExternalPayments","external_payments_default","_ExternalPromotions","ApiResource","resource","params","options","id","externalPromotionId","_externalPromotionId","ids","ExternalPromotions","external_promotions_default","_ExternalTaxCalculators","ApiResource","resource","params","options","id","externalTaxCalculatorId","_externalTaxCalculatorId","ids","ExternalTaxCalculators","external_tax_calculators_default","_FixedAmountPromotions","ApiResource","resource","params","options","id","fixedAmountPromotionId","_fixedAmountPromotionId","ids","FixedAmountPromotions","fixed_amount_promotions_default","_FixedPricePromotions","ApiResource","resource","params","options","id","fixedPricePromotionId","_fixedPricePromotionId","ids","FixedPricePromotions","fixed_price_promotions_default","_FreeGiftPromotions","ApiResource","resource","params","options","id","freeGiftPromotionId","_freeGiftPromotionId","ids","FreeGiftPromotions","free_gift_promotions_default","_FreeShippingPromotions","ApiResource","resource","params","options","id","freeShippingPromotionId","_freeShippingPromotionId","ids","FreeShippingPromotions","free_shipping_promotions_default","_Geocoders","ApiResource","geocoderId","params","options","_geocoderId","resource","id","ids","Geocoders","geocoders_default","_GiftCardRecipients","ApiResource","resource","params","options","id","giftCardRecipientId","_giftCardRecipientId","ids","GiftCardRecipients","gift_card_recipients_default","_GiftCards","ApiResource","resource","params","options","id","giftCardId","_giftCardId","triggerValue","ids","GiftCards","gift_cards_default","_GoogleGeocoders","ApiResource","resource","params","options","id","googleGeocoderId","_googleGeocoderId","ids","GoogleGeocoders","google_geocoders_default","_Imports","ApiResource","resource","params","options","id","importId","_importId","ids","Imports","imports_default","_InStockSubscriptions","ApiResource","resource","params","options","id","inStockSubscriptionId","_inStockSubscriptionId","ids","InStockSubscriptions","in_stock_subscriptions_default","_InventoryModels","ApiResource","resource","params","options","id","inventoryModelId","_inventoryModelId","ids","InventoryModels","inventory_models_default","_InventoryReturnLocations","ApiResource","resource","params","options","id","inventoryReturnLocationId","_inventoryReturnLocationId","ids","InventoryReturnLocations","inventory_return_locations_default","_InventoryStockLocations","ApiResource","resource","params","options","id","inventoryStockLocationId","_inventoryStockLocationId","ids","InventoryStockLocations","inventory_stock_locations_default","_KlarnaGateways","ApiResource","resource","params","options","id","klarnaGatewayId","_klarnaGatewayId","ids","KlarnaGateways","klarna_gateways_default","_KlarnaPayments","ApiResource","resource","params","options","id","klarnaPaymentId","_klarnaPaymentId","ids","KlarnaPayments","klarna_payments_default","_LineItemOptions","ApiResource","resource","params","options","id","lineItemOptionId","_lineItemOptionId","ids","LineItemOptions","line_item_options_default","_LineItems","ApiResource","resource","params","options","id","lineItemId","_lineItemId","ids","LineItems","line_items_default","_ManualGateways","ApiResource","resource","params","options","id","manualGatewayId","_manualGatewayId","ids","ManualGateways","manual_gateways_default","_ManualTaxCalculators","ApiResource","resource","params","options","id","manualTaxCalculatorId","_manualTaxCalculatorId","ids","ManualTaxCalculators","manual_tax_calculators_default","_Markets","ApiResource","resource","params","options","id","marketId","_marketId","ids","Markets","markets_default","_Merchants","ApiResource","resource","params","options","id","merchantId","_merchantId","ids","Merchants","merchants_default","_OrderAmountPromotionRules","ApiResource","resource","params","options","id","orderAmountPromotionRuleId","_orderAmountPromotionRuleId","ids","OrderAmountPromotionRules","order_amount_promotion_rules_default","_OrderCopies","ApiResource","resource","params","options","id","orderCopyId","_orderCopyId","ids","OrderCopies","order_copies_default","_OrderFactories","ApiResource","orderFactoryId","params","options","_orderFactoryId","resource","id","ids","OrderFactories","order_factories_default","_OrderSubscriptionItems","ApiResource","resource","params","options","id","orderSubscriptionItemId","_orderSubscriptionItemId","ids","OrderSubscriptionItems","order_subscription_items_default","_OrderSubscriptions","ApiResource","resource","params","options","id","orderSubscriptionId","_orderSubscriptionId","ids","OrderSubscriptions","order_subscriptions_default","_OrderValidationRules","ApiResource","orderValidationRuleId","params","options","_orderValidationRuleId","resource","id","ids","OrderValidationRules","order_validation_rules_default","_Orders","ApiResource","resource","params","options","id","orderId","_orderId","triggerValue","ids","Orders","orders_default","_Organizations","ApiSingleton","resource","id","ids","Organizations","organization_default","_Packages","ApiResource","resource","params","options","id","packageId","_packageId","ids","Packages","packages_default","_ParcelLineItems","ApiResource","resource","params","options","id","parcelLineItemId","_parcelLineItemId","ids","ParcelLineItems","parcel_line_items_default","_Parcels","ApiResource","resource","params","options","id","parcelId","_parcelId","ids","Parcels","parcels_default","_PaymentGateways","ApiResource","paymentGatewayId","params","options","_paymentGatewayId","resource","id","ids","PaymentGateways","payment_gateways_default","_PaymentMethods","ApiResource","resource","params","options","id","paymentMethodId","_paymentMethodId","ids","PaymentMethods","payment_methods_default","_PaymentOptions","ApiResource","resource","params","options","id","paymentOptionId","_paymentOptionId","ids","PaymentOptions","payment_options_default","_PaypalGateways","ApiResource","resource","params","options","id","paypalGatewayId","_paypalGatewayId","ids","PaypalGateways","paypal_gateways_default","_PaypalPayments","ApiResource","resource","params","options","id","paypalPaymentId","_paypalPaymentId","ids","PaypalPayments","paypal_payments_default","_PercentageDiscountPromotions","ApiResource","resource","params","options","id","percentageDiscountPromotionId","_percentageDiscountPromotionId","ids","PercentageDiscountPromotions","percentage_discount_promotions_default","_PriceFrequencyTiers","ApiResource","resource","params","options","id","priceFrequencyTierId","_priceFrequencyTierId","ids","PriceFrequencyTiers","price_frequency_tiers_default","_PriceLists","ApiResource","resource","params","options","id","priceListId","_priceListId","ids","PriceLists","price_lists_default","_PriceTiers","ApiResource","priceTierId","params","options","_priceTierId","resource","id","ids","PriceTiers","price_tiers_default","_PriceVolumeTiers","ApiResource","resource","params","options","id","priceVolumeTierId","_priceVolumeTierId","ids","PriceVolumeTiers","price_volume_tiers_default","_Prices","ApiResource","resource","params","options","id","priceId","_priceId","ids","Prices","prices_default","_PromotionRules","ApiResource","promotionRuleId","params","options","_promotionRuleId","resource","id","ids","PromotionRules","promotion_rules_default","_Promotions","ApiResource","promotionId","params","options","_promotionId","resource","id","ids","Promotions","promotions_default","_RecurringOrderCopies","ApiResource","resource","params","options","id","recurringOrderCopyId","_recurringOrderCopyId","ids","RecurringOrderCopies","recurring_order_copies_default","_Refunds","ApiResource","refundId","params","options","_refundId","resource","id","ids","Refunds","refunds_default","_ReservedStocks","ApiResource","reservedStockId","params","options","_reservedStockId","resource","id","ids","ReservedStocks","reserved_stocks_default","_ResourceErrors","ApiResource","resource","id","ids","ResourceErrors","resource_errors_default","_ReturnLineItems","ApiResource","resource","params","options","id","returnLineItemId","_returnLineItemId","ids","ReturnLineItems","return_line_items_default","_Returns","ApiResource","resource","params","options","id","returnId","_returnId","ids","Returns","returns_default","_SatispayGateways","ApiResource","resource","params","options","id","satispayGatewayId","_satispayGatewayId","ids","SatispayGateways","satispay_gateways_default","_SatispayPayments","ApiResource","resource","params","options","id","satispayPaymentId","_satispayPaymentId","ids","SatispayPayments","satispay_payments_default","_Shipments","ApiResource","resource","params","options","id","shipmentId","_shipmentId","ids","Shipments","shipments_default","_ShippingCategories","ApiResource","resource","params","options","id","shippingCategoryId","_shippingCategoryId","ids","ShippingCategories","shipping_categories_default","_ShippingMethodTiers","ApiResource","shippingMethodTierId","params","options","_shippingMethodTierId","resource","id","ids","ShippingMethodTiers","shipping_method_tiers_default","_ShippingMethods","ApiResource","resource","params","options","id","shippingMethodId","_shippingMethodId","ids","ShippingMethods","shipping_methods_default","_ShippingWeightTiers","ApiResource","resource","params","options","id","shippingWeightTierId","_shippingWeightTierId","ids","ShippingWeightTiers","shipping_weight_tiers_default","_ShippingZones","ApiResource","resource","params","options","id","shippingZoneId","_shippingZoneId","ids","ShippingZones","shipping_zones_default","_SkuListItems","ApiResource","resource","params","options","id","skuListItemId","_skuListItemId","ids","SkuListItems","sku_list_items_default","_SkuListPromotionRules","ApiResource","resource","params","options","id","skuListPromotionRuleId","_skuListPromotionRuleId","ids","SkuListPromotionRules","sku_list_promotion_rules_default","_SkuLists","ApiResource","resource","params","options","id","skuListId","_skuListId","ids","SkuLists","sku_lists_default","_SkuOptions","ApiResource","resource","params","options","id","skuOptionId","_skuOptionId","ids","SkuOptions","sku_options_default","_Skus","ApiResource","resource","params","options","id","skuId","_skuId","ids","Skus","skus_default","_StockItems","ApiResource","resource","params","options","id","stockItemId","_stockItemId","ids","StockItems","stock_items_default","_StockLineItems","ApiResource","resource","params","options","id","stockLineItemId","_stockLineItemId","ids","StockLineItems","stock_line_items_default","_StockLocations","ApiResource","resource","params","options","id","stockLocationId","_stockLocationId","ids","StockLocations","stock_locations_default","_StockReservations","ApiResource","resource","params","options","id","stockReservationId","_stockReservationId","ids","StockReservations","stock_reservations_default","_StockTransfers","ApiResource","resource","params","options","id","stockTransferId","_stockTransferId","ids","StockTransfers","stock_transfers_default","_StripeGateways","ApiResource","resource","params","options","id","stripeGatewayId","_stripeGatewayId","ids","StripeGateways","stripe_gateways_default","_StripePayments","ApiResource","resource","params","options","id","stripePaymentId","_stripePaymentId","ids","StripePayments","stripe_payments_default","_SubscriptionModels","ApiResource","resource","params","options","id","subscriptionModelId","_subscriptionModelId","ids","SubscriptionModels","subscription_models_default","_Tags","ApiResource","resource","params","options","id","ids","Tags","tags_default","_TaxCalculators","ApiResource","taxCalculatorId","params","options","_taxCalculatorId","resource","id","ids","TaxCalculators","tax_calculators_default","_TaxCategories","ApiResource","resource","params","options","id","taxCategoryId","_taxCategoryId","ids","TaxCategories","tax_categories_default","_TaxRules","ApiResource","resource","params","options","id","taxRuleId","_taxRuleId","ids","TaxRules","tax_rules_default","_TaxjarAccounts","ApiResource","resource","params","options","id","taxjarAccountId","_taxjarAccountId","ids","TaxjarAccounts","taxjar_accounts_default","_Transactions","ApiResource","transactionId","params","options","_transactionId","resource","id","ids","Transactions","transactions_default","_Versions","ApiResource","resource","id","ids","Versions","versions_default","_Voids","ApiResource","voidId","params","options","_voidId","resource","id","ids","Voids","voids_default","_Webhooks","ApiResource","resource","params","options","id","webhookId","_webhookId","ids","Webhooks","webhooks_default","_WireTransfers","ApiResource","resource","params","options","id","wireTransferId","_wireTransferId","ids","WireTransfers","wire_transfers_default","resourceList","singletonList","CommerceLayerStatic","sort","resourceList","singletonList","resource","error","SdkError","ApiError","config","commercelayer_default","OPEN_API_SCHEMA_VERSION","debug","debug_default","OPEN_API_SCHEMA_VERSION","_adapter","_slug","_addresses","_adjustments","_adyen_gateways","_adyen_payments","_application","_attachments","_authorizations","_avalara_accounts","_axerve_gateways","_axerve_payments","_billing_info_validation_rules","_bing_geocoders","_braintree_gateways","_braintree_payments","_bundles","_buy_x_pay_y_promotions","_captures","_carrier_accounts","_checkout_com_gateways","_checkout_com_payments","_cleanups","_coupon_codes_promotion_rules","_coupon_recipients","_coupons","_custom_promotion_rules","_customer_addresses","_customer_groups","_customer_password_resets","_customer_payment_sources","_customer_subscriptions","_customers","_delivery_lead_times","_event_callbacks","_events","_exports","_external_gateways","_external_payments","_external_promotions","_external_tax_calculators","_fixed_amount_promotions","_fixed_price_promotions","_free_gift_promotions","_free_shipping_promotions","_geocoders","_gift_card_recipients","_gift_cards","_google_geocoders","_imports","_in_stock_subscriptions","_inventory_models","_inventory_return_locations","_inventory_stock_locations","_klarna_gateways","_klarna_payments","_line_item_options","_line_items","_manual_gateways","_manual_tax_calculators","_markets","_merchants","_order_amount_promotion_rules","_order_copies","_order_factories","_order_subscription_items","_order_subscriptions","_order_validation_rules","_orders","_organization","_packages","_parcel_line_items","_parcels","_payment_gateways","_payment_methods","_payment_options","_paypal_gateways","_paypal_payments","_percentage_discount_promotions","_price_frequency_tiers","_price_lists","_price_tiers","_price_volume_tiers","_prices","_promotion_rules","_promotions","_recurring_order_copies","_refunds","_reserved_stocks","_resource_errors","_return_line_items","_returns","_satispay_gateways","_satispay_payments","_shipments","_shipping_categories","_shipping_method_tiers","_shipping_methods","_shipping_weight_tiers","_shipping_zones","_sku_list_items","_sku_list_promotion_rules","_sku_lists","_sku_options","_skus","_stock_items","_stock_line_items","_stock_locations","_stock_reservations","_stock_transfers","_stripe_gateways","_stripe_payments","_subscription_models","_tags","_tax_calculators","_tax_categories","_tax_rules","_taxjar_accounts","_transactions","_versions","_voids","_webhooks","_wire_transfers","CommerceLayerClient","config","OPEN_API_SCHEMA_VERSION","__privateAdd","debug","__privateSet","resource_default","__privateGet","addresses_default","adjustments_default","adyen_gateways_default","adyen_payments_default","application_default","attachments_default","authorizations_default","avalara_accounts_default","axerve_gateways_default","axerve_payments_default","billing_info_validation_rules_default","bing_geocoders_default","braintree_gateways_default","braintree_payments_default","bundles_default","buy_x_pay_y_promotions_default","captures_default","carrier_accounts_default","checkout_com_gateways_default","checkout_com_payments_default","cleanups_default","coupon_codes_promotion_rules_default","coupon_recipients_default","coupons_default","custom_promotion_rules_default","customer_addresses_default","customer_groups_default","customer_password_resets_default","customer_payment_sources_default","customer_subscriptions_default","customers_default","delivery_lead_times_default","event_callbacks_default","events_default","exports_default","external_gateways_default","external_payments_default","external_promotions_default","external_tax_calculators_default","fixed_amount_promotions_default","fixed_price_promotions_default","free_gift_promotions_default","free_shipping_promotions_default","geocoders_default","gift_card_recipients_default","gift_cards_default","google_geocoders_default","imports_default","in_stock_subscriptions_default","inventory_models_default","inventory_return_locations_default","inventory_stock_locations_default","klarna_gateways_default","klarna_payments_default","line_item_options_default","line_items_default","manual_gateways_default","manual_tax_calculators_default","markets_default","merchants_default","order_amount_promotion_rules_default","order_copies_default","order_factories_default","order_subscription_items_default","order_subscriptions_default","order_validation_rules_default","orders_default","organization_default","packages_default","parcel_line_items_default","parcels_default","payment_gateways_default","payment_methods_default","payment_options_default","paypal_gateways_default","paypal_payments_default","percentage_discount_promotions_default","price_frequency_tiers_default","price_lists_default","price_tiers_default","price_volume_tiers_default","prices_default","promotion_rules_default","promotions_default","recurring_order_copies_default","refunds_default","reserved_stocks_default","resource_errors_default","return_line_items_default","returns_default","satispay_gateways_default","satispay_payments_default","shipments_default","shipping_categories_default","shipping_method_tiers_default","shipping_methods_default","shipping_weight_tiers_default","shipping_zones_default","sku_list_items_default","sku_list_promotion_rules_default","sku_lists_default","sku_options_default","skus_default","stock_items_default","stock_line_items_default","stock_locations_default","stock_reservations_default","stock_transfers_default","stripe_gateways_default","stripe_payments_default","subscription_models_default","tags_default","tax_calculators_default","tax_categories_default","tax_rules_default","taxjar_accounts_default","transactions_default","versions_default","voids_default","webhooks_default","wire_transfers_default","CommerceLayerStatic","resource","error","onSuccess","onFailure","type","id","options","reader","rawResponseInterceptor","response","ho","value","key","CommerceLayer","commercelayer_default"]}