@sumup/sdk
Version:
The official TypeScript SDK for the SumUp API
1 lines • 106 kB
Source Map (JSON)
{"version":3,"file":"index.cjs","sources":["webpack://@sumup/sdk/webpack/runtime/define_property_getters","webpack://@sumup/sdk/webpack/runtime/has_own_property","webpack://@sumup/sdk/webpack/runtime/make_namespace_object","webpack://@sumup/sdk/./src/core.ts","webpack://@sumup/sdk/./src/version.ts","webpack://@sumup/sdk/./src/client.ts","webpack://@sumup/sdk/./src/resources/checkouts/index.ts","webpack://@sumup/sdk/./src/resources/customers/index.ts","webpack://@sumup/sdk/./src/resources/members/index.ts","webpack://@sumup/sdk/./src/resources/memberships/index.ts","webpack://@sumup/sdk/./src/resources/merchant/index.ts","webpack://@sumup/sdk/./src/resources/payouts/index.ts","webpack://@sumup/sdk/./src/resources/readers/index.ts","webpack://@sumup/sdk/./src/resources/receipts/index.ts","webpack://@sumup/sdk/./src/resources/roles/index.ts","webpack://@sumup/sdk/./src/resources/subaccounts/index.ts","webpack://@sumup/sdk/./src/resources/transactions/index.ts","webpack://@sumup/sdk/./src/index.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// Code generated by @sumup/ts-sdk-gen@0.0.1. DO NOT EDIT.\n\nimport type { SumUp } from \"./index\";\n\nexport class APIResource {\n protected _client: SumUp;\n\n constructor(client: SumUp) {\n this._client = client;\n }\n}\n\n// has to be any. the particular query params types don't like unknown\n// biome-ignore lint/suspicious/noExplicitAny: any, but only for tests\ntype QueryParams = Record<string, any>;\n\n/**\n * Params that get passed to `fetch`. This ends up as an optional second\n * argument to each generated request method. Properties are a subset of\n * `RequestInit`.\n */\nexport type FetchParams = Omit<RequestInit, \"body\" | \"method\">;\n\n/** All arguments to `request()` */\nexport type FullParams = FetchParams & {\n path: string;\n query?: QueryParams;\n body?: unknown;\n host?: string;\n method?: string;\n};\n\nexport class SumUpError extends Error {}\n\nexport class APIError<T> extends SumUpError {\n /* HTTP status for the response that caused the error */\n readonly status: number;\n /* JSON body of the response that caused the error */\n readonly error: T | string;\n /* Raw response of the API */\n readonly response: Response;\n\n constructor(status: number, error: T | string, response: Response) {\n const message = typeof error === \"string\" ? error : JSON.stringify(error);\n super(`${status}: ${message}`);\n this.status = status;\n this.error = error;\n this.response = response;\n }\n}\n\nexport class APIPromise<T> implements Promise<T> {\n constructor(private resp: Promise<Response>) {}\n\n async parse(): Promise<T> {\n const res = await this.resp;\n const contentType = res.headers.get(\"content-type\");\n const isJSON = contentType?.includes(\"application/json\");\n\n if (!isJSON) {\n throw new SumUpError(\"Unexpected non-json response.\");\n }\n\n return await res.json();\n }\n\n async withResponse(): Promise<{ data: T; response: Response }> {\n const [data, response] = await Promise.all([this.parse(), await this.resp]);\n return { data, response };\n }\n\n // biome-ignore lint/suspicious/noThenProperty: custom promise to enable `withResponse`\n then<TResult1 = T, TResult2 = never>(\n onFulfilled?: (value: T) => TResult1 | PromiseLike<TResult1>,\n // biome-ignore lint/suspicious/noExplicitAny: must satisfy promise interface\n onRejected?: (reason: any) => TResult2 | PromiseLike<TResult2>,\n ): Promise<TResult1 | TResult2> {\n return this.parse().then(onFulfilled, onRejected);\n }\n\n catch<TResult = never>(\n // biome-ignore lint/suspicious/noExplicitAny: must satisfy promise interface\n onRejected?: (reason: any) => TResult | PromiseLike<TResult>,\n ): Promise<T | TResult> {\n return this.parse().catch(onRejected);\n }\n\n finally(onFinally?: () => void): Promise<T> {\n return this.parse().finally(onFinally);\n }\n\n [Symbol.toStringTag] = \"APIPromise\";\n}\n","export const VERSION = \"0.0.4\"; // x-release-please-version\n","// Code generated by `ts-sdk-gen`. Edit to customize your HTTP client.\n\nimport * as Core from \"./core\";\nimport { VERSION } from \"./version\";\n\nexport type APIConfig = {\n apiKey?: string;\n baseParams?: Core.FetchParams;\n host?: string;\n};\n\nexport class HTTPClient {\n host: string;\n apiKey?: string;\n baseParams: Core.FetchParams;\n\n constructor({\n apiKey,\n host = \"https://api.sumup.com\",\n baseParams = {},\n }: APIConfig = {}) {\n this.host = host;\n this.apiKey = apiKey;\n\n const headers = new Headers({\n \"Accept\": \"application/json\",\n \"Content-Type\": \"application/json\",\n \"User-Agent\": `${this.constructor.name.toLowerCase()}-ts/${VERSION}`,\n });\n if (apiKey) {\n headers.append(\"Authorization\", `Bearer ${apiKey}`);\n }\n this.baseParams = mergeParams({ headers }, baseParams);\n }\n\n public get<R, E = Core.APIError<unknown>>({\n ...params\n }: Omit<Core.FullParams, \"method\">): Core.APIPromise<R> {\n return this.request<R, E>({\n method: \"GET\",\n ...params,\n });\n }\n\n public post<R, E = Core.APIError<unknown>>({\n ...params\n }: Omit<Core.FullParams, \"method\">): Core.APIPromise<R> {\n return this.request<R, E>({\n method: \"POST\",\n ...params,\n });\n }\n\n public put<R, E = Core.APIError<unknown>>({\n ...params\n }: Omit<Core.FullParams, \"method\">): Core.APIPromise<R> {\n return this.request<R, E>({\n method: \"put\",\n ...params,\n });\n }\n\n public patch<R, E = Core.APIError<unknown>>({\n ...params\n }: Omit<Core.FullParams, \"method\">): Core.APIPromise<R> {\n return this.request<R, E>({\n method: \"PATCH\",\n ...params,\n });\n }\n\n public delete<R, E = Core.APIError<unknown>>({\n ...params\n }: Omit<Core.FullParams, \"method\">): Core.APIPromise<R> {\n return this.request<R, E>({\n method: \"DELETE\",\n ...params,\n });\n }\n\n public request<T, E = Core.APIError<unknown>>({\n body,\n path,\n query,\n host: hostOverride,\n ...fetchParams\n }: Core.FullParams): Core.APIPromise<T> {\n const host = hostOverride || this.host;\n const url = new URL(\n host +\n (host.endsWith(\"/\") && path.startsWith(\"/\") ? path.slice(1) : path),\n );\n if (typeof query === \"object\" && query && !Array.isArray(query)) {\n url.search = this.stringifyQuery(query as Record<string, unknown>);\n }\n const init = {\n ...mergeParams(this.baseParams, fetchParams),\n body: JSON.stringify(body),\n };\n return new Core.APIPromise<T>(this.do<E>(url, init));\n }\n\n protected async do<E>(input: URL, init: RequestInit): Promise<Response> {\n const res = await fetch(input, init);\n\n if (!res.ok) {\n const contentType = res.headers.get(\"content-type\");\n const isJSON = contentType?.includes(\"application/json\");\n throw new Core.APIError(\n res.status,\n isJSON ? ((await res.json()) as E) : await res.text(),\n res,\n );\n }\n\n return res;\n }\n\n protected stringifyQuery(query: Record<string, unknown>): string {\n return Object.entries(query)\n .filter(([_, value]) => typeof value !== \"undefined\")\n .map(([key, value]) => {\n if (\n typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\"\n ) {\n return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;\n }\n if (value === null) {\n return `${encodeURIComponent(key)}=`;\n }\n if (Array.isArray(value)) {\n return value\n .map((v) => `${encodeURIComponent(key)}=${encodeURIComponent(v)}`)\n .join(\"&\");\n }\n throw new Error(\n `Cannot stringify type ${typeof value}; Expected string, number, boolean, or null.`,\n );\n })\n .join(\"&\");\n }\n}\n\nexport function mergeParams(\n a: Core.FetchParams,\n b: Core.FetchParams,\n): Core.FetchParams {\n // calling `new Headers()` normalizes `HeadersInit`, which could be a Headers\n // object, a plain object, or an array of tuples\n const headers = new Headers(a.headers);\n for (const [key, value] of new Headers(b.headers).entries()) {\n headers.set(key, value);\n }\n return { ...a, ...b, headers };\n}\n","// Code generated by @sumup/ts-sdk-gen@0.0.1. DO NOT EDIT.\n\nimport * as Core from \"../../core\";\n\n/**\n * Profile's personal address information.\n */\nexport type Address = {\n /**\n * City name from the address.\n */\n city?: string;\n /**\n * Two letter country code formatted according to [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).\n */\n country?: string;\n /**\n * First line of the address with details of the street name and number.\n */\n line_1?: string;\n /**\n * Second line of the address with details of the building, unit, apartment, and floor numbers.\n */\n line_2?: string;\n /**\n * Postal code from the address.\n */\n postal_code?: string;\n /**\n * State name or abbreviation from the address.\n */\n state?: string;\n};\n\n/**\n * __Required when payment type is `card`.__ Details of the payment card.\n */\nexport type Card = {\n /**\n * Name of the cardholder as it appears on the payment card.\n */\n name: string;\n /**\n * Number of the payment card (without spaces).\n */\n number: string;\n /**\n * Year from the expiration time of the payment card. Accepted formats are `YY` and `YYYY`.\n */\n expiry_year: string;\n /**\n * Month from the expiration time of the payment card. Accepted format is `MM`.\n */\n expiry_month:\n | \"01\"\n | \"02\"\n | \"03\"\n | \"04\"\n | \"05\"\n | \"06\"\n | \"07\"\n | \"08\"\n | \"09\"\n | \"10\"\n | \"11\"\n | \"12\";\n /**\n * Three or four-digit card verification value (security code) of the payment card.\n */\n cvv: string;\n /**\n * Required five-digit ZIP code. Applicable only to merchant users in the USA.\n */\n zip_code?: string;\n /**\n * Last 4 digits of the payment card number.\n */\n last_4_digits: string;\n /**\n * Issuing card network of the payment card.\n */\n type:\n | \"AMEX\"\n | \"CUP\"\n | \"DINERS\"\n | \"DISCOVER\"\n | \"ELO\"\n | \"ELV\"\n | \"HIPERCARD\"\n | \"JCB\"\n | \"MAESTRO\"\n | \"MASTERCARD\"\n | \"VISA\"\n | \"VISA_ELECTRON\"\n | \"VISA_VPAY\"\n | \"UNKNOWN\";\n};\n\n/**\n * Three-letter [ISO4217](https://en.wikipedia.org/wiki/ISO_4217) code of the currency for the amount. Currently supported currency values are enumerated above.\n */\nexport type Currency =\n | \"BGN\"\n | \"BRL\"\n | \"CHF\"\n | \"CLP\"\n | \"CZK\"\n | \"DKK\"\n | \"EUR\"\n | \"GBP\"\n | \"HRK\"\n | \"HUF\"\n | \"NOK\"\n | \"PLN\"\n | \"RON\"\n | \"SEK\"\n | \"USD\";\n\n/**\n * Created mandate\n */\nexport type MandateResponse = {\n /**\n * Indicates the mandate type\n */\n type?: string;\n /**\n * Mandate status\n */\n status?: string;\n /**\n * Merchant code which has the mandate\n */\n merchant_code?: string;\n};\n\n/**\n * Details of the transaction.\n */\nexport type TransactionMixinBase = {\n /**\n * Unique ID of the transaction.\n */\n id?: string;\n /**\n * Transaction code returned by the acquirer/processing entity after processing the transaction.\n */\n transaction_code?: string;\n /**\n * Total amount of the transaction.\n */\n amount?: number;\n currency?: Currency;\n /**\n * Date and time of the creation of the transaction. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code.\n */\n timestamp?: string;\n /**\n * Current status of the transaction.\n */\n status?: \"SUCCESSFUL\" | \"CANCELLED\" | \"FAILED\" | \"PENDING\";\n /**\n * Payment type used for the transaction.\n */\n payment_type?: \"ECOM\" | \"RECURRING\" | \"BOLETO\";\n /**\n * Current number of the installment for deferred payments.\n */\n installments_count?: number;\n};\n\nexport type TransactionMixinCheckout = {\n /**\n * Unique code of the registered merchant to whom the payment is made.\n */\n merchant_code?: string;\n /**\n * Amount of the applicable VAT (out of the total transaction amount).\n */\n vat_amount?: number;\n /**\n * Amount of the tip (out of the total transaction amount).\n */\n tip_amount?: number;\n /**\n * Entry mode of the payment details.\n */\n entry_mode?: \"CUSTOMER_ENTRY\" | \"BOLETO\";\n /**\n * Authorization code for the transaction sent by the payment card issuer or bank. Applicable only to card payments.\n */\n auth_code?: string;\n /**\n * Internal unique ID of the transaction on the SumUp platform.\n */\n internal_id?: number;\n};\n\n/**\n * Checkout\n *\n * Details of the payment checkout.\n */\nexport type Checkout = {\n /**\n * Unique ID of the payment checkout specified by the client application when creating the checkout resource.\n */\n checkout_reference?: string;\n /**\n * Amount of the payment.\n */\n amount?: number;\n currency?: Currency;\n /**\n * Unique identifying code of the merchant profile.\n */\n merchant_code?: string;\n /**\n * Short description of the checkout visible in the SumUp dashboard. The description can contribute to reporting, allowing easier identification of a checkout.\n */\n description?: string;\n /**\n * URL to which the SumUp platform sends the processing status of the payment checkout.\n */\n return_url?: string;\n /**\n * Unique ID of the checkout resource.\n */\n id?: string;\n /**\n * Current status of the checkout.\n */\n status?: \"PENDING\" | \"FAILED\" | \"PAID\";\n /**\n * Date and time of the creation of the payment checkout. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code.\n */\n date?: string;\n /**\n * Date and time of the checkout expiration before which the client application needs to send a processing request. If no value is present, the checkout does not have an expiration time.\n */\n valid_until?: string | null;\n /**\n * Unique identification of a customer. If specified, the checkout session and payment instrument are associated with the referenced customer.\n */\n customer_id?: string;\n mandate?: MandateResponse;\n /**\n * List of transactions related to the payment.\n */\n transactions?: (TransactionMixinBase & TransactionMixinCheckout)[];\n};\n\n/**\n * Details of the payment checkout.\n */\nexport type CheckoutCreateRequest = {\n /**\n * Unique ID of the payment checkout specified by the client application when creating the checkout resource.\n */\n checkout_reference: string;\n /**\n * Amount of the payment.\n */\n amount: number;\n currency: Currency;\n /**\n * Unique identifying code of the merchant profile.\n */\n merchant_code: string;\n /**\n * Short description of the checkout visible in the SumUp dashboard. The description can contribute to reporting, allowing easier identification of a checkout.\n */\n description?: string;\n /**\n * URL to which the SumUp platform sends the processing status of the payment checkout.\n */\n return_url?: string;\n /**\n * Unique identification of a customer. If specified, the checkout session and payment instrument are associated with the referenced customer.\n */\n customer_id?: string;\n /**\n * Purpose of the checkout.\n */\n purpose?: \"CHECKOUT\" | \"SETUP_RECURRING_PAYMENT\";\n /**\n * Unique ID of the checkout resource.\n */\n id?: string;\n /**\n * Current status of the checkout.\n */\n status?: \"PENDING\" | \"FAILED\" | \"PAID\";\n /**\n * Date and time of the creation of the payment checkout. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code.\n */\n date?: string;\n /**\n * Date and time of the checkout expiration before which the client application needs to send a processing request. If no value is present, the checkout does not have an expiration time.\n */\n valid_until?: string | null;\n /**\n * List of transactions related to the payment.\n */\n transactions?: (TransactionMixinBase & TransactionMixinCheckout)[];\n /**\n * __Required__ for [APMs](https://developer.sumup.com/online-payments/apm/introduction) and __recommended__ for card payments. Refers to a url where the end user is redirected once the payment processing completes. If not specified, the [Payment Widget](https://developer.sumup.com/online-payments/tools/card-widget) renders [3DS challenge](https://developer.sumup.com/online-payments/features/3ds) within an iframe instead of performing a full-page redirect.\n */\n redirect_url?: string;\n};\n\n/**\n * Mandate is passed when a card is to be tokenized\n */\nexport type MandatePayload = {\n /**\n * Indicates the mandate type\n */\n type: \"recurrent\";\n /**\n * Operating system and web client used by the end-user\n */\n user_agent: string;\n /**\n * IP address of the end user. Supports IPv4 and IPv6\n */\n user_ip?: string;\n};\n\n/**\n * Personal details for the customer.\n */\nexport type PersonalDetails = {\n /**\n * First name of the customer.\n */\n first_name?: string;\n /**\n * Last name of the customer.\n */\n last_name?: string;\n /**\n * Email address of the customer.\n */\n email?: string;\n /**\n * Phone number of the customer.\n */\n phone?: string;\n /**\n * Date of birth of the customer.\n */\n birth_date?: string;\n /**\n * An identification number user for tax purposes (e.g. CPF)\n */\n tax_id?: string;\n address?: Address;\n};\n\n/**\n * Details of the payment instrument for processing the checkout.\n */\nexport type CheckoutProcessMixin = {\n /**\n * Describes the payment method used to attempt processing\n */\n payment_type: \"card\" | \"boleto\" | \"ideal\" | \"blik\" | \"bancontact\";\n /**\n * Number of installments for deferred payments. Available only to merchant users in Brazil.\n */\n installments?: number;\n mandate?: MandatePayload;\n card?: Card;\n /**\n * __Required when using a tokenized card to process a checkout.__ Unique token identifying the saved payment card for a customer.\n */\n token?: string;\n /**\n * __Required when `token` is provided.__ Unique ID of the customer.\n */\n customer_id?: string;\n personal_details?: PersonalDetails;\n};\n\nexport type CheckoutSuccess = Checkout & {\n /**\n * Transaction code of the successful transaction with which the payment for the checkout is completed.\n */\n transaction_code?: string;\n /**\n * Transaction ID of the successful transaction with which the payment for the checkout is completed.\n */\n transaction_id?: string;\n /**\n * Name of the merchant\n */\n merchant_name?: string;\n /**\n * Refers to a url where the end user is redirected once the payment processing completes.\n */\n redirect_url?: string;\n /**\n * Object containing token information for the specified payment instrument\n */\n payment_instrument?: {\n /**\n * Token value\n */\n token?: string;\n };\n};\n\n/**\n * 3DS Response\n */\nexport type CheckoutAccepted = {\n /**\n * Required action processing 3D Secure payments.\n */\n next_step?: {\n /**\n * Where the end user is redirected.\n */\n url?: string;\n /**\n * Method used to complete the redirect.\n */\n method?: string;\n /**\n * Refers to a url where the end user is redirected once the payment processing completes.\n */\n redirect_url?: string;\n /**\n * Indicates allowed mechanisms for redirecting an end user. If both values are provided to ensure a redirect takes place in either.\n */\n mechanism?: (\"iframe\" | \"browser\")[];\n /**\n * Contains parameters essential for form redirection. Number of object keys and their content can vary.\n */\n payload?: {\n PaReq?: Record<string, unknown>;\n MD?: Record<string, unknown>;\n TermUrl?: Record<string, unknown>;\n };\n };\n};\n\nexport type ErrorExtended = Error & {\n /**\n * Parameter name (with relative location) to which the error applies. Parameters from embedded resources are displayed using dot notation. For example, `card.name` refers to the `name` parameter embedded in the `card` object.\n */\n param?: string;\n};\n\n/**\n * Error message for forbidden requests.\n */\nexport type ErrorForbidden = {\n /**\n * Short description of the error.\n */\n error_message?: string;\n /**\n * Platform code for the error.\n */\n error_code?: string;\n /**\n * HTTP status code for the error.\n */\n status_code?: string;\n};\n\n/**\n * Error message structure.\n */\nexport type DetailsError = {\n /**\n * Short title of the error.\n */\n title?: string;\n /**\n * Details of the error.\n */\n details?: string;\n /**\n * The status code.\n */\n status?: number;\n failed_constraints?: { message?: string; reference?: string }[];\n};\n\nexport type GetPaymentMethodsQueryParams = {\n amount?: number;\n currency?: string;\n};\n\nexport type GetPaymentMethodsResponse = {\n available_payment_methods?: {\n /**\n * The ID of the payment method.\n */\n id: string;\n }[];\n};\n\nexport type ListCheckoutsQueryParams = {\n checkout_reference?: string;\n};\n\nexport type ListCheckoutsResponse = CheckoutSuccess[];\n\nexport type DeactivateCheckoutResponse = {\n /**\n * Unique ID of the payment checkout specified by the client application when creating the checkout resource.\n */\n checkout_reference?: string;\n /**\n * Unique ID of the checkout resource.\n */\n id?: string;\n /**\n * Amount of the payment.\n */\n amount?: number;\n currency?: Currency;\n /**\n * Unique identifying code of the merchant profile.\n */\n merchant_code?: string;\n /**\n * Short description of the checkout visible in the SumUp dashboard. The description can contribute to reporting, allowing easier identification of a checkout.\n */\n description?: string;\n /**\n * Purpose of the checkout creation initially\n */\n purpose?: \"SETUP_RECURRING_PAYMENT\" | \"CHECKOUT\";\n /**\n * Current status of the checkout.\n */\n status?: \"EXPIRED\";\n /**\n * Date and time of the creation of the payment checkout. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code.\n */\n date?: string;\n /**\n * Date and time of the checkout expiration before which the client application needs to send a processing request. If no value is present, the checkout does not have an expiration time.\n */\n valid_until?: string | null;\n /**\n * Merchant name\n */\n merchant_name?: string;\n /**\n * The merchant's country\n */\n merchant_country?: string;\n /**\n * List of transactions related to the payment.\n */\n transactions?: (TransactionMixinBase & TransactionMixinCheckout)[];\n};\n\nexport class Checkouts extends Core.APIResource {\n /**\n * Get available payment methods\n */\n listAvailablePaymentMethods(\n merchantCode: string,\n query?: GetPaymentMethodsQueryParams,\n params?: Core.FetchParams,\n ): Core.APIPromise<GetPaymentMethodsResponse> {\n return this._client.get<GetPaymentMethodsResponse>({\n path: `/v0.1/merchants/${merchantCode}/payment-methods`,\n query,\n ...params,\n });\n }\n\n /**\n * List checkouts\n */\n list(\n query?: ListCheckoutsQueryParams,\n params?: Core.FetchParams,\n ): Core.APIPromise<CheckoutSuccess[]> {\n return this._client.get<CheckoutSuccess[]>({\n path: `/v0.1/checkouts`,\n query,\n ...params,\n });\n }\n\n /**\n * Create a checkout\n */\n create(\n body: CheckoutCreateRequest,\n params?: Core.FetchParams,\n ): Core.APIPromise<Checkout> {\n return this._client.post<Checkout>({\n path: `/v0.1/checkouts`,\n body,\n ...params,\n });\n }\n\n /**\n * Retrieve a checkout\n */\n get(id: string, params?: Core.FetchParams): Core.APIPromise<CheckoutSuccess> {\n return this._client.get<CheckoutSuccess>({\n path: `/v0.1/checkouts/${id}`,\n ...params,\n });\n }\n\n /**\n * Process a checkout\n */\n process(\n id: string,\n body: CheckoutProcessMixin,\n params?: Core.FetchParams,\n ): Core.APIPromise<CheckoutSuccess | CheckoutAccepted> {\n return this._client.put<CheckoutSuccess | CheckoutAccepted>({\n path: `/v0.1/checkouts/${id}`,\n body,\n ...params,\n });\n }\n\n /**\n * Deactivate a checkout\n */\n deactivate(\n id: string,\n params?: Core.FetchParams,\n ): Core.APIPromise<DeactivateCheckoutResponse> {\n return this._client.delete<DeactivateCheckoutResponse>({\n path: `/v0.1/checkouts/${id}`,\n ...params,\n });\n }\n}\n\nexport declare namespace Checkouts {\n export type {\n Address,\n Card,\n Checkout,\n CheckoutAccepted,\n CheckoutCreateRequest,\n CheckoutProcessMixin,\n CheckoutSuccess,\n Currency,\n DetailsError,\n ErrorExtended,\n ErrorForbidden,\n GetPaymentMethodsQueryParams,\n ListCheckoutsQueryParams,\n MandatePayload,\n MandateResponse,\n PersonalDetails,\n TransactionMixinBase,\n TransactionMixinCheckout,\n };\n}\n","// Code generated by @sumup/ts-sdk-gen@0.0.1. DO NOT EDIT.\n\nimport * as Core from \"../../core\";\n\n/**\n * Profile's personal address information.\n */\nexport type Address = {\n /**\n * City name from the address.\n */\n city?: string;\n /**\n * Two letter country code formatted according to [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).\n */\n country?: string;\n /**\n * First line of the address with details of the street name and number.\n */\n line_1?: string;\n /**\n * Second line of the address with details of the building, unit, apartment, and floor numbers.\n */\n line_2?: string;\n /**\n * Postal code from the address.\n */\n postal_code?: string;\n /**\n * State name or abbreviation from the address.\n */\n state?: string;\n};\n\n/**\n * Created mandate\n */\nexport type MandateResponse = {\n /**\n * Indicates the mandate type\n */\n type?: string;\n /**\n * Mandate status\n */\n status?: string;\n /**\n * Merchant code which has the mandate\n */\n merchant_code?: string;\n};\n\n/**\n * Personal details for the customer.\n */\nexport type PersonalDetails = {\n /**\n * First name of the customer.\n */\n first_name?: string;\n /**\n * Last name of the customer.\n */\n last_name?: string;\n /**\n * Email address of the customer.\n */\n email?: string;\n /**\n * Phone number of the customer.\n */\n phone?: string;\n /**\n * Date of birth of the customer.\n */\n birth_date?: string;\n /**\n * An identification number user for tax purposes (e.g. CPF)\n */\n tax_id?: string;\n address?: Address;\n};\n\n/**\n * Customer\n */\nexport type Customer = {\n /**\n * Unique ID of the customer.\n */\n customer_id: string;\n personal_details?: PersonalDetails;\n};\n\n/**\n * Error message for forbidden requests.\n */\nexport type ErrorForbidden = {\n /**\n * Short description of the error.\n */\n error_message?: string;\n /**\n * Platform code for the error.\n */\n error_code?: string;\n /**\n * HTTP status code for the error.\n */\n status_code?: string;\n};\n\n/**\n * Payment Instrument Response\n */\nexport type PaymentInstrumentResponse = {\n /**\n * Unique token identifying the saved payment card for a customer.\n */\n token?: string;\n /**\n * Indicates whether the payment instrument is active and can be used for payments. To deactivate it, send a `DELETE` request to the resource endpoint.\n */\n active?: boolean;\n /**\n * Type of the payment instrument.\n */\n type?: \"card\";\n /**\n * Details of the payment card.\n */\n card?: {\n /**\n * Last 4 digits of the payment card number.\n */\n last_4_digits?: string;\n /**\n * Issuing card network of the payment card.\n */\n type?:\n | \"AMEX\"\n | \"CUP\"\n | \"DINERS\"\n | \"DISCOVER\"\n | \"ELO\"\n | \"ELV\"\n | \"HIPERCARD\"\n | \"JCB\"\n | \"MAESTRO\"\n | \"MASTERCARD\"\n | \"VISA\"\n | \"VISA_ELECTRON\"\n | \"VISA_VPAY\"\n | \"UNKNOWN\";\n };\n mandate?: MandateResponse;\n /**\n * Creation date of payment instrument. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code.\n */\n created_at?: string;\n};\n\nexport type UpdateCustomerParams = { personal_details?: PersonalDetails };\n\nexport type ListPaymentInstrumentsResponse = PaymentInstrumentResponse[];\n\nexport class Customers extends Core.APIResource {\n /**\n * Create a customer\n */\n create(body: Customer, params?: Core.FetchParams): Core.APIPromise<Customer> {\n return this._client.post<Customer>({\n path: `/v0.1/customers`,\n body,\n ...params,\n });\n }\n\n /**\n * Retrieve a customer\n */\n get(\n customerId: string,\n params?: Core.FetchParams,\n ): Core.APIPromise<Customer> {\n return this._client.get<Customer>({\n path: `/v0.1/customers/${customerId}`,\n ...params,\n });\n }\n\n /**\n * Update a customer\n */\n update(\n customerId: string,\n body: UpdateCustomerParams,\n params?: Core.FetchParams,\n ): Core.APIPromise<Customer> {\n return this._client.put<Customer>({\n path: `/v0.1/customers/${customerId}`,\n body,\n ...params,\n });\n }\n\n /**\n * List payment instruments\n */\n listPaymentInstruments(\n customerId: string,\n params?: Core.FetchParams,\n ): Core.APIPromise<PaymentInstrumentResponse[]> {\n return this._client.get<PaymentInstrumentResponse[]>({\n path: `/v0.1/customers/${customerId}/payment-instruments`,\n ...params,\n });\n }\n\n /**\n * Deactivate a payment instrument\n */\n deactivatePaymentInstrument(\n customerId: string,\n token: string,\n params?: Core.FetchParams,\n ): Core.APIPromise<void> {\n return this._client.delete<void>({\n path: `/v0.1/customers/${customerId}/payment-instruments/${token}`,\n ...params,\n });\n }\n}\n\nexport declare namespace Customers {\n export type {\n Address,\n Customer,\n ErrorForbidden,\n MandateResponse,\n PaymentInstrumentResponse,\n PersonalDetails,\n UpdateCustomerParams,\n };\n}\n","// Code generated by @sumup/ts-sdk-gen@0.0.1. DO NOT EDIT.\n\nimport * as Core from \"../../core\";\n\n/**\n * The status of the membership.\n */\nexport type MembershipStatus =\n | \"accepted\"\n | \"pending\"\n | \"expired\"\n | \"disabled\"\n | \"unknown\";\n\n/**\n * Invite\n *\n * Pending invitation for membership.\n */\nexport type Invite = {\n /**\n * Email address of the invited user.\n */\n email: string;\n expires_at: string;\n};\n\n/**\n * Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata.\n */\nexport type Metadata = Record<string, Record<string, unknown>>;\n\n/**\n * Object attributes that modifiable only by SumUp applications.\n */\nexport type Attributes = Record<string, Record<string, unknown>>;\n\n/**\n * Classic identifiers of the user.\n *\n * @deprecated\n */\nexport type MembershipUserClassic = { user_id: number };\n\n/**\n * Information about the user associated with the membership.\n */\nexport type MembershipUser = {\n /**\n * Identifier for the End-User (also called Subject).\n */\n id: string;\n /**\n * End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, for unique identification use ID instead.\n */\n email: string;\n /**\n * True if the user has enabled MFA on login.\n */\n mfa_on_login_enabled: boolean;\n /**\n * True if the user is a virtual user (operator).\n */\n virtual_user: boolean;\n /**\n * True if the user is a service account.\n */\n service_account_user: boolean;\n /**\n * Time when the user has been disabled. Applies only to virtual users (`virtual_user: true`).\n */\n disabled_at?: string;\n /**\n * User's preferred name. Used for display purposes only.\n */\n nickname?: string;\n /**\n * URL of the End-User's profile picture. This URL refers to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image.\n */\n picture?: string;\n classic?: MembershipUserClassic;\n};\n\n/**\n * Member\n *\n * A member is user within specific resource identified by resource id, resource type, and associated roles.\n */\nexport type Member = {\n /**\n * ID of the member.\n */\n id: string;\n /**\n * User's roles.\n */\n roles: string[];\n /**\n * User's permissions.\n */\n permissions: string[];\n /**\n * The timestamp of when the member was created.\n */\n created_at: string;\n /**\n * The timestamp of when the member was last updated.\n */\n updated_at: string;\n user?: MembershipUser;\n invite?: Invite;\n status: MembershipStatus;\n metadata?: Metadata;\n attributes?: Attributes;\n};\n\nexport type ListMerchantMembersQueryParams = {\n offset?: number;\n limit?: number;\n scroll?: boolean;\n email?: string;\n status?: MembershipStatus;\n roles?: string[];\n};\n\nexport type ListMerchantMembersResponse = {\n items: Member[];\n total_count?: number;\n};\n\nexport type CreateMerchantMemberParams = {\n /**\n * True if the user is managed by the merchant. In this case, we'll created a virtual user with the provided password and nickname.\n */\n is_managed_user?: boolean;\n /**\n * True if the user is a service account. It can later be used to create OAuth2 clients.\n */\n is_service_account?: boolean;\n /**\n * Email address of the member to add.\n */\n email: string;\n /**\n * Password of the member to add. Only used if `is_managed_user` is true. In the case of service accounts, the password is not used and can not be defined by the caller.\n */\n password?: string;\n /**\n * Nickname of the member to add. Only used if `is_managed_user` is true. Used for display purposes only.\n */\n nickname?: string;\n /**\n * List of roles to assign to the new member. In the case of service accounts, the roles are predefined.\n */\n roles: string[];\n metadata?: Metadata;\n attributes?: Attributes;\n};\n\nexport type UpdateMerchantMemberParams = {\n roles?: string[];\n metadata?: Metadata;\n attributes?: Attributes;\n /**\n * Allows you to update user data of managed users.\n */\n user?: {\n /**\n * User's preferred name. Used for display purposes only.\n */\n nickname?: string;\n /**\n * Password of the member to add. Only used if `is_managed_user` is true.\n */\n password?: string;\n };\n};\n\nexport class Members extends Core.APIResource {\n /**\n * List members\n */\n list(\n merchantCode: string,\n query?: ListMerchantMembersQueryParams,\n params?: Core.FetchParams,\n ): Core.APIPromise<ListMerchantMembersResponse> {\n return this._client.get<ListMerchantMembersResponse>({\n path: `/v0.1/merchants/${merchantCode}/members`,\n query,\n ...params,\n });\n }\n\n /**\n * Create a member\n */\n create(\n merchantCode: string,\n body: CreateMerchantMemberParams,\n params?: Core.FetchParams,\n ): Core.APIPromise<Member> {\n return this._client.post<Member>({\n path: `/v0.1/merchants/${merchantCode}/members`,\n body,\n ...params,\n });\n }\n\n /**\n * Retrieve a member\n */\n get(\n merchantCode: string,\n memberId: string,\n params?: Core.FetchParams,\n ): Core.APIPromise<Member> {\n return this._client.get<Member>({\n path: `/v0.1/merchants/${merchantCode}/members/${memberId}`,\n ...params,\n });\n }\n\n /**\n * Update a member\n */\n update(\n merchantCode: string,\n memberId: string,\n body: UpdateMerchantMemberParams,\n params?: Core.FetchParams,\n ): Core.APIPromise<Member> {\n return this._client.put<Member>({\n path: `/v0.1/merchants/${merchantCode}/members/${memberId}`,\n body,\n ...params,\n });\n }\n\n /**\n * Delete a member\n */\n delete(\n merchantCode: string,\n memberId: string,\n params?: Core.FetchParams,\n ): Core.APIPromise<void> {\n return this._client.delete<void>({\n path: `/v0.1/merchants/${merchantCode}/members/${memberId}`,\n ...params,\n });\n }\n}\n\nexport declare namespace Members {\n export type {\n Attributes,\n CreateMerchantMemberParams,\n Invite,\n ListMerchantMembersQueryParams,\n Member,\n MembershipStatus,\n MembershipUser,\n MembershipUserClassic,\n Metadata,\n UpdateMerchantMemberParams,\n };\n}\n","// Code generated by @sumup/ts-sdk-gen@0.0.1. DO NOT EDIT.\n\nimport * as Core from \"../../core\";\n\n/**\n * The status of the membership.\n */\nexport type MembershipStatus =\n | \"accepted\"\n | \"pending\"\n | \"expired\"\n | \"disabled\"\n | \"unknown\";\n\n/**\n * Invite\n *\n * Pending invitation for membership.\n */\nexport type Invite = {\n /**\n * Email address of the invited user.\n */\n email: string;\n expires_at: string;\n};\n\n/**\n * Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata.\n */\nexport type Metadata = Record<string, Record<string, unknown>>;\n\n/**\n * Object attributes that modifiable only by SumUp applications.\n */\nexport type Attributes = Record<string, Record<string, unknown>>;\n\n/**\n * Resource\n *\n * Information about the resource the membership is in.\n */\nexport type MembershipResource = {\n /**\n * ID of the resource the membership is in.\n */\n id: string;\n type: \"merchant\";\n /**\n * Display name of the resource.\n */\n name: string;\n /**\n * Logo fo the resource.\n */\n logo?: string;\n /**\n * The timestamp of when the membership resource was created.\n */\n created_at: string;\n /**\n * The timestamp of when the membership resource was last updated.\n */\n updated_at: string;\n attributes: Attributes;\n};\n\n/**\n * Membership\n *\n * A membership associates a user with a resource, memberships is defined by user, resource, resource type, and associated roles.\n */\nexport type Membership = {\n /**\n * ID of the membership.\n */\n id: string;\n /**\n * ID of the resource the membership is in.\n */\n resource_id: string;\n /**\n * Type of the resource the membership is in.\n */\n type: \"merchant\";\n /**\n * User's roles.\n */\n roles: string[];\n /**\n * User's permissions.\n */\n permissions: string[];\n /**\n * The timestamp of when the membership was created.\n */\n created_at: string;\n /**\n * The timestamp of when the membership was last updated.\n */\n updated_at: string;\n invite?: Invite;\n status: MembershipStatus;\n metadata?: Metadata;\n attributes?: Attributes;\n resource: MembershipResource;\n};\n\nexport type ListMembershipsQueryParams = {\n offset?: number;\n limit?: number;\n /**\n * The kind of the membership resource.\n * Possible values are:\n * * `merchant` - merchant account(s)\n */\n kind?: \"merchant\";\n \"resource.attributes.sandbox\"?: boolean;\n \"resource.name\"?: string;\n};\n\nexport type ListMembershipsResponse = {\n items: Membership[];\n total_count: number;\n};\n\nexport class Memberships extends Core.APIResource {\n /**\n * List memberships\n */\n list(\n query?: ListMembershipsQueryParams,\n params?: Core.FetchParams,\n ): Core.APIPromise<ListMembershipsResponse> {\n return this._client.get<ListMembershipsResponse>({\n path: `/v0.1/memberships`,\n query,\n ...params,\n });\n }\n}\n\nexport declare namespace Memberships {\n export type {\n Attributes,\n Invite,\n ListMembershipsQueryParams,\n Membership,\n MembershipResource,\n MembershipStatus,\n Metadata,\n };\n}\n","// Code generated by @sumup/ts-sdk-gen@0.0.1. DO NOT EDIT.\n\nimport * as Core from \"../../core\";\n\n/**\n * Profile information.\n */\nexport type Account = {\n /**\n * Username of the user profile.\n */\n username?: string;\n /**\n * The role of the user.\n */\n type?: \"normal\" | \"operator\";\n};\n\n/**\n * Country Details\n */\nexport type CountryDetails = {\n /**\n * Currency ISO 4217 code\n */\n currency?: string;\n /**\n * Country ISO code\n */\n iso_code?: string;\n /**\n * Country EN name\n */\n en_name?: string;\n /**\n * Country native name\n */\n native_name?: string;\n};\n\n/**\n * TimeOffset Details\n */\nexport type TimeoffsetDetails = {\n /**\n * Postal code\n */\n post_code?: string;\n /**\n * UTC offset\n */\n offset?: number;\n /**\n * Daylight Saving Time\n */\n dst?: boolean;\n};\n\n/**\n * Details of the registered address.\n */\nexport type AddressWithDetails = {\n /**\n * Address line 1\n */\n address_line1?: string;\n /**\n * Address line 2\n */\n address_line2?: string;\n /**\n * City\n */\n city?: string;\n /**\n * Country ISO 3166-1 code\n */\n country?: string;\n /**\n * Country region id\n */\n region_id?: number;\n /**\n * Region name\n */\n region_name?: string;\n /**\n * Region code\n */\n region_code?: string;\n /**\n * Postal code\n */\n post_code?: string;\n /**\n * Landline number\n */\n landline?: string;\n /**\n * undefined\n */\n first_name?: string;\n /**\n * undefined\n */\n last_name?: string;\n /**\n * undefined\n */\n company?: string;\n country_details?: CountryDetails;\n timeoffset_details?: TimeoffsetDetails;\n /**\n * undefined\n */\n state_id?: string;\n};\n\n/**\n * Mobile app settings\n */\nexport type AppSettings = {\n /**\n * Checkout preference\n */\n checkout_preference?: string;\n /**\n * Include vat.\n */\n include_vat?: boolean;\n /**\n * Manual entry tutorial.\n */\n manual_entry_tutorial?: boolean;\n /**\n * Mobile payment tutorial.\n */\n mobile_payment_tutorial?: boolean;\n /**\n * Tax enabled.\n */\n tax_enabled?: boolean;\n /**\n * Mobile payment.\n */\n mobile_payment?: string;\n /**\n * Reader payment.\n */\n reader_payment?: string;\n /**\n * Cash payment.\n */\n cash_payment?: string;\n /**\n * Advanced mode.\n */\n advanced_mode?: string;\n /**\n * Expected max transaction amount.\n */\n expected_max_transaction_amount?: number;\n /**\n * Manual entry.\n */\n manual_entry?: string;\n /**\n * Terminal mode tutorial.\n */\n terminal_mode_tutorial?: boolean;\n /**\n * Tipping.\n */\n tipping?: string;\n /**\n * Tip rates.\n */\n tip_rates?: number[];\n /**\n * Barcode scanner.\n */\n barcode_scanner?: string;\n /**\n * Referral.\n */\n referral?: string;\n};\n\nexport type BankAccount = {\n /**\n * Bank code\n */\n bank_code?: string;\n /**\n * Branch code\n */\n branch_code?: string;\n /**\n * SWIFT code\n */\n swift?: string;\n /**\n * Account number\n */\n account_number?: string;\n /**\n * IBAN\n */\n iban?: string;\n /**\n * Type of the account\n */\n account_type?: string;\n /**\n * Account category - business or personal\n */\n account_category?: string;\n account_holder_name?: string;\n /**\n * Status in the verification process\n */\n status?: string;\n /**\n * The primary bank account is the one used for payouts\n */\n primary?: boolean;\n /**\n * Creation date of the bank account\n */\n created_at?: string;\n /**\n * Bank name\n */\n bank_name?: string;\n};\n\n/**\n * Business owners information.\n */\nexport type BusinessOwners = {\n /**\n * BO's first name\n */\n first_name?: string;\n /**\n * BO's last name of the user\n */\n last_name?: string;\n /**\n * Date of birth\n */\n date_of_birth?: string;\n /**\n * Mobile phone number\n */\n mobile_phone?: string;\n /**\n * BO's Landline\n */\n landline?: string;\n /**\n * Ownership percentage\n */\n ownership?: number;\n}[];\n\n/**\n * Doing Business As information\n */\nexport type DoingBusinessAs = {\n /**\n * Doing business as name\n */\n business_name?: string;\n /**\n * Doing business as company registration number\n */\n company_registration_number?: string;\n /**\n * Doing business as VAT ID\n */\n vat_id?: string;\n /**\n * Doing business as website\n */\n website?: string;\n /**\n * Doing business as email\n */\n email?: string;\n address?: {\n /**\n * Address line 1\n */\n address_line1?: string;\n /**\n * Address line 2\n */\n address_line2?: string;\n /**\n * City\n */\n city?: string;\n /**\n * Country ISO 3166-1 code\n */\n country?: string;\n /**\n * Country region ID\n */\n region_id?: number;\n /**\n * Country region name\n */\n region_name?: string;\n /**\n * Postal code\n */\n post_code?: string;\n };\n};\n\n/**\n * Error message for forbidden requests.\n */\nexport type ErrorForbidden = {\n /**\n * Short description of the error.\n */\n error_message?: string;\n /**\n * Platform code for the error.\n */\n error_code?: string;\n /**\n * HTTP status code for the error.\n */\n status_code?: string;\n};\n\n/**\n * Id of the legal type of the merchant profile\n */\nexport type LegalType = {\n /**\n * Unique id\n */\n id?: number;\n /**\n * Legal type description\n */\n full_description?: string;\n /**\n * Legal type short description\n */\n description?: string;\n /**\n * Sole trader legal type if true\n */\n sole_trader?: boolean;\n};\n\n/**\n * Account's personal profile.\n */\nexport type PersonalProfile = {\n /**\n * First name of the user\n */\n first_name?: string;\n /**\n * Last name of the user\n */\n last_name?: string;\n /**\n * Date of birth\n */\n date_of_birth?: string;\n /**\n * Mobile phone number\n */\n mobile_phone?: string;\n address?: AddressWithDetails;\n complete?: boolean;\n};\n\n/**\n * Merchant settings (like \\\"payout_type\\\", \\\"payout_period\\\")\n */\nexport type MerchantSettings = {\n /**\n * Whether to show tax in receipts (saved per transaction)\n */\n tax_enabled?: boolean;\n /**\n * Payout type\n */\n payout_type?: string;\n /**\n * Payout frequency\n */\n payout_period?: string;\n /**\n * Whether merchant can edit payouts on demand\n */\n payout_on_demand_available?: boolean;\n /**\n * Whether merchant will receive payouts on demand\n */\n payout_on_demand?: boolean;\n /**\n * Whether to show printers in mobile app\n */\n printers_enabled?: boolean;\n /**\n * Payout Instrument\n */\n payout_instrument?: string;\n /**\n * Whether merchant can make MOTO payments\n */\n moto_payment?: \"UNAVAILABLE\" | \"ENFORCED\" | \"ON\" | \"OFF\";\n /**\n * Stone merchant code\n */\n stone_merchant_code?: string;\n /**\n * Whether merchant will receive daily payout emails\n */\n daily_payout_email?: boolean;\n /**\n * Whether merchant will receive monthly payout emails\n */\n monthly_payout_email?: boolean;\n /**\n * Whether merchant has gross settlement enabled\n */\n gross_settlement?: boolean;\n};\n\n/**\n * Merchant VAT rates\n */\nexport type VatRates = {\n /**\n * Internal ID\n */\n id?: number;\n /**\n * Description\n */\n description?: string;\n /**\n * Rate\n */\n rate?: number;\n /**\n * Ordering\n */\n ordering?: number;\n /**\n * Country ISO code\n */\n country?: string;\n};\n\n/**\n * Account's merchant profile\n */\nexport type MerchantProfile = {\n /**\n * Unique identifying code of the merchant profile\n */\n merchant_code?: string;\n /**\n * Company name\n */\n company_name?: string;\n /**\n * Website\n */\n website?: string;\n legal_type?: LegalType;\n /**\n * Merchant category code\n */\n merchant_category_code?: string;\n /**\n * Mobile phone number\n */\n mobile_phone?: string;\n /**\n * Company registration number\n */\n company_registration_number?: string;\n /**\n * Vat ID\n */\n vat_id?: string;\n /**\n * Permanent certificate access code (Portugal)\n */\n permanent_certificate_access_code?: string;\n /**\n * Nature and purpose of the business\n */\n nature_and_purpose?: string;\n address?: AddressWithDetails;\n business_owners?: BusinessOwners;\n doing_business_as?: DoingBusinessAs;\n settings?: MerchantSettings;\n vat_rates?: VatRates;\n /**\n * Me