@wix/auto_sdk_payments_site-payment-method-types 1.0.21 → 1.0.23
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/build/cjs/index.d.ts +6 -3
- package/build/cjs/index.js.map +1 -1
- package/build/es/index.d.mts +6 -3
- package/build/es/index.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +6 -3
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/es/index.d.mts +6 -3
- package/build/internal/es/index.mjs.map +1 -1
- package/package.json +3 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
1
|
+
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
2
|
import { GetSitePaymentMethodTypeOptions, SitePaymentMethodType, ListSitePaymentMethodTypesOptions, ListSitePaymentMethodTypesResponse } from './index.typings.js';
|
|
3
3
|
export { AuthCapture, Barcode, BuyerFlow, CredentialOnFile, CustomTokenization, Disputes, ExpressFlow, Features, Format, FullPageRedirect, GetSitePaymentMethodTypeRequest, GetSitePaymentMethodTypeResponse, IFrame, Icon, Installments, ListSitePaymentMethodTypesRequest, MerchantFlow, Moto, NewTab, NextAction, PromotionalMessages, QrCode, Refunds, RegularFlow, RegularTokenization, RequestedFields } from './index.typings.js';
|
|
4
4
|
|
|
5
|
+
type SitePaymentMethodTypeNonNullablePaths = `_id` | `features.expressFlow.supported` | `features.regularFlow.supported` | `features.disputes.supported` | `features.installments.supported` | `features.installments.allowedCountryCodes` | `features.refunds.supported` | `features.authCapture.supported` | `features.regularTokenization.supported` | `features.customTokenization.supported` | `features.nextAction.iframe.supported` | `features.nextAction.newTab.supported` | `features.nextAction.fullPageRedirect.supported` | `features.nextAction.barcode.supported` | `features.nextAction.qrCode.supported` | `features.credentialOnFile.supported` | `features.moto.supported` | `features.promotionalMessages.supported` | `merchantFlow.icons` | `merchantFlow.icons.${number}.format` | `merchantFlow.priority` | `merchantFlow.promoted` | `merchantFlow.hidden` | `merchantFlow.countryRestricted` | `buyerFlow.icons` | `buyerFlow.icons.${number}.format` | `buyerFlow.priority` | `buyerFlow.hidden` | `buyerFlow.countryRestricted` | `brandOnly` | `inPerson` | `currencyRestricted` | `currencyRestrictionEnabled` | `allowedCurrencyCodes`;
|
|
5
6
|
declare function getSitePaymentMethodType$1(httpClient: HttpClient): GetSitePaymentMethodTypeSignature;
|
|
6
7
|
interface GetSitePaymentMethodTypeSignature {
|
|
7
8
|
/**
|
|
@@ -16,7 +17,7 @@ interface GetSitePaymentMethodTypeSignature {
|
|
|
16
17
|
* @param - Site payment method type ID.
|
|
17
18
|
* @returns Requested site payment method type.
|
|
18
19
|
*/
|
|
19
|
-
(sitePaymentMethodTypeId: string, options?: GetSitePaymentMethodTypeOptions
|
|
20
|
+
(sitePaymentMethodTypeId: string, options?: GetSitePaymentMethodTypeOptions): Promise<NonNullablePaths<SitePaymentMethodType, SitePaymentMethodTypeNonNullablePaths>>;
|
|
20
21
|
}
|
|
21
22
|
declare function listSitePaymentMethodTypes$1(httpClient: HttpClient): ListSitePaymentMethodTypesSignature;
|
|
22
23
|
interface ListSitePaymentMethodTypesSignature {
|
|
@@ -34,7 +35,9 @@ interface ListSitePaymentMethodTypesSignature {
|
|
|
34
35
|
* Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.
|
|
35
36
|
* `currency` is used to determine the eligibility of payment method types for the provided currency.
|
|
36
37
|
*/
|
|
37
|
-
(options?: ListSitePaymentMethodTypesOptions
|
|
38
|
+
(options?: ListSitePaymentMethodTypesOptions): Promise<NonNullablePaths<ListSitePaymentMethodTypesResponse, {
|
|
39
|
+
[P in SitePaymentMethodTypeNonNullablePaths]: `sitePaymentMethodTypes.${number}.${P}`;
|
|
40
|
+
}[SitePaymentMethodTypeNonNullablePaths]>>;
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
declare const getSitePaymentMethodType: MaybeContext<BuildRESTFunction<typeof getSitePaymentMethodType$1> & typeof getSitePaymentMethodType$1>;
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.ts","../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.http.ts","../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.public.ts","../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.context.ts"],"sourcesContent":["export * from './src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.http.js';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** A way to pay online or offline for goods or services offered by a specific site. */\nexport interface SitePaymentMethodType {\n /**\n * Payment method type ID.\n * @format GUID\n * @immutable\n */\n _id?: string;\n /**\n * Value used buy some legacy APIs to refer to this payment method type. Can be empty.\n * @minLength 1\n * @maxLength 50\n * @immutable\n */\n legacyId?: string | null;\n /**\n * Payment method type display name, based on locale.\n *\n * Used by Wix when displaying the payment method type, such as in the payment settings page for merchants, or the checkout page for buyers.\n *\n * Define your locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the descriptions for the `country_code` and `language_code` parameters for those methods.\n * @minLength 1\n * @maxLength 100\n */\n displayName?: string | null;\n /**\n * Payment method type description, based on locale.\n *\n * Used by Wix when displaying the payment method type, such as in the payment settings page for merchants, or the checkout page for buyers.\n *\n * Define your locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the descriptions for the `country_code` and `language_code` parameters for those methods.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n /** Features supported for this payment method type. */\n features?: Features;\n /** Settings that determine if and how to display this payment method type in the merchant flow. The merchant flow is the process a merchant goes through to configure which payment method types they accept on their site. */\n merchantFlow?: MerchantFlow;\n /** Settings that determine if and how to display this payment method type in the buyer flow. The buyer flow is the process a buyer goes through to make a purchase att checkout. */\n buyerFlow?: BuyerFlow;\n /**\n * Whether this payment method type is only used to represent a supported payment brand for another payment method type.\n *\n * For example, a Visa payment method is used to indicate that Visa can be used for credit card transactions. But the Visa payment method type is not used to accept payments. Instead, the credit card payment method type is used.\n *\n * Brand-only payment method types cannot be used to accept payments, and are not listed as a payment method type in a site's dashboard.\n */\n brandOnly?: boolean;\n /** Whether the payment method type can only be used for in-person payments, such as cash, point-of-sale payments, and card readers. */\n inPerson?: boolean;\n /**\n * Time (in seconds after which a transaction is marked as expired if it is not completed.\n *\n * Max: `15552000` (180 days)\n * @min 1\n * @max 15552000\n */\n transactionExpirationDelayInSeconds?: number | null;\n /** Indicates that payment method type is restricted for the provided `currency_code`. */\n currencyRestricted?: boolean;\n /** Indicates the payment method type has currency restriction and it is enabled. */\n currencyRestrictionEnabled?: boolean;\n /**\n * Allowed currencies\n * @maxSize 100\n * @format CURRENCY\n */\n allowedCurrencyCodes?: string[];\n}\n\nexport interface Features {\n /** Express flow configuration. */\n expressFlow?: ExpressFlow;\n /** Regular flow configuration. */\n regularFlow?: RegularFlow;\n /** Disputes configuration. */\n disputes?: Disputes;\n /** Installments configuration. */\n installments?: Installments;\n /** Refunds configuration. */\n refunds?: Refunds;\n /** Authorize and capture configuration. */\n authCapture?: AuthCapture;\n /** Regular tokenization configuration. */\n regularTokenization?: RegularTokenization;\n /** Custom tokenization configuration. */\n customTokenization?: CustomTokenization;\n /** Next action configuration. */\n nextAction?: NextAction;\n /** Credential-on-File (CoF) configuration. */\n credentialOnFile?: CredentialOnFile;\n /** Mail Order/Telephone Order (MOTO) configuration. */\n moto?: Moto;\n /** Promotional message configuration. */\n promotionalMessages?: PromotionalMessages;\n}\n\nexport interface IFrame {\n /** Whether the next payment action can be shown in an iframe. */\n supported?: boolean;\n}\n\nexport interface NewTab {\n /** Whether the next payment action can be shown in a new tab. */\n supported?: boolean;\n}\n\nexport interface FullPageRedirect {\n /** Whether the next payment action can be shown by redirecting to a new page. */\n supported?: boolean;\n}\n\nexport interface Barcode {\n /** Whether the next payment action can be shown as a barcode to scan. */\n supported?: boolean;\n}\n\nexport interface QrCode {\n /** Whether the next payment action can be shown as a QR code to scan. */\n supported?: boolean;\n}\n\nexport interface ExpressFlow {\n /** Whether this payment method type can be used in an express flow on checkout. */\n supported?: boolean;\n}\n\nexport interface RegularFlow {\n /** Whether this payment method type can be used in a regular flow on checkout. */\n supported?: boolean;\n}\n\nexport interface Disputes {\n /** Whether disputes are supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface Installments {\n /** Whether installments are supported for this payment method type. */\n supported?: boolean;\n /**\n * Max number of installments that can be configured by a provider.\n * @min 2\n * @max 36\n */\n maxInstallmentLimit?: number | null;\n /**\n * Countries for which installments can be enabled.\n * @format COUNTRY\n * @minSize 1\n * @maxSize 200\n */\n allowedCountryCodes?: string[];\n}\n\nexport interface Refunds {\n /** Whether refunds are supported for this payment method type. */\n supported?: boolean;\n /**\n * Maximum period in which payments made using this payment method type can be refunded.\n * @min 1\n * @max 365\n */\n maxRefundabilityPeriodInDays?: number | null;\n}\n\nexport interface AuthCapture {\n /** Whether the authorize and capture flow is supported for this payment method type. */\n supported?: boolean;\n /**\n * Period to wait for the auth capture to be completed before canceling the transaction.\n * @min 1\n * @max 365\n */\n maxCapturePeriodInDays?: number | null;\n}\n\nexport interface RegularTokenization {\n /** Whether the default tokenization mechanism can be configured for this payment method type. */\n supported?: boolean;\n}\n\nexport interface CustomTokenization {\n /** Whether a custom tokenization mechanism can be configured for this payment method type, such as a provider-specific tokenization method. */\n supported?: boolean;\n}\n\nexport interface NextAction {\n /** iframe configuration. */\n iframe?: IFrame;\n /** New tab configuration. */\n newTab?: NewTab;\n /** Full page redirect configuration. */\n fullPageRedirect?: FullPageRedirect;\n /** Barcode configuration. */\n barcode?: Barcode;\n /** QR code configuration. */\n qrCode?: QrCode;\n}\n\nexport interface CredentialOnFile {\n /** Whether the Credential-on-File (CoF) feature is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface Moto {\n /** Whether Mail Order/Telephone Order (MOTO) is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface PromotionalMessages {\n /** Whether promotional messages is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface MerchantFlow {\n /**\n * Details about the icons to display for this payment method type on the merchant's Accept Payments page in the site dashboard. Icons are localized according to the locale of the call.\n *\n * Define a locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the method descriptions.\n * @maxSize 200\n */\n icons?: Icon[];\n /**\n * Priority given to this payment method type in the list shown to the merchant.\n * A lower value relative to other payment method types means a higher position on the list.\n * @min 1\n * @max 10000\n */\n priority?: number;\n /** Whether the payment method type is promoted. Promoted payment method types are displayed more prominently on the Accept Payments page. */\n promoted?: boolean;\n /** Whether the merchant cannot choose to accept payments from this payment method type. */\n hidden?: boolean;\n /** Indicates that payment method type is restricted in provided country. */\n countryRestricted?: boolean;\n}\n\n/**\n * Example url:\n * http://images-wixmp-6613fa290e8c1ac70a0297b6.wixmp.com/payment-methods/{domain}/{extension}/{id}.{extension}\n */\nexport interface Icon {\n /** Icon image. */\n image?: string;\n /**\n * Icon tag. Payment method types can have multiple icons, and tags are used to differentiate between them.\n * For example, the UI design for multiple payment method types is upgraded, and now they each have an old icon tagged \"v1\" and a new icon tagged \"v2\". Developers can then easily choose to display all the original \"v1\" style of icons, or all the new \"v2\" style.\n * @minLength 1\n * @maxLength 100\n */\n tag?: string | null;\n /** Icon image format. */\n format?: FormatWithLiterals;\n}\n\nexport enum Format {\n UNKNOWN_FORMAT = 'UNKNOWN_FORMAT',\n SVG = 'SVG',\n PNG = 'PNG',\n}\n\n/** @enumType */\nexport type FormatWithLiterals = Format | 'UNKNOWN_FORMAT' | 'SVG' | 'PNG';\n\nexport interface BuyerFlow {\n /**\n * Details about the icons to display for this payment method type on a site's checkout page. Icons are localized according to the locale of the call.\n *\n * Define a locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the method descriptions.\n * @maxSize 200\n */\n icons?: Icon[];\n /**\n * The priority given to this payment method type in the list of payment method types shown to the buyer.\n * A lower value relative to other payment method types means a higher position on the list.\n * @min 1\n * @max 10000\n */\n priority?: number;\n /** Whether the merchant cannot choose to accept payments from this payment method type. */\n hidden?: boolean;\n /** Indicates that payment method type is restricted in provided country. */\n countryRestricted?: boolean;\n /**\n * Minimum payment amount that can be made with this payment method type.\n * If the request omits `currency_code`, the field is not set because its value depends on the currency.\n * @decimalValue options { maxScale:8, gte:0.00 }\n */\n minPaymentAmount?: string | null;\n}\n\nexport interface GetSitePaymentMethodTypeRequest {\n /**\n * Site payment method type ID.\n * @format GUID\n */\n sitePaymentMethodTypeId: string;\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\nexport enum RequestedFields {\n UNKNOWN_REQUESTED_FIELD = 'UNKNOWN_REQUESTED_FIELD',\n ALLOWED_CURRENCIES = 'ALLOWED_CURRENCIES',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELD'\n | 'ALLOWED_CURRENCIES';\n\nexport interface GetSitePaymentMethodTypeResponse {\n /** Requested site payment method type. */\n sitePaymentMethodType?: SitePaymentMethodType;\n}\n\nexport interface ListSitePaymentMethodTypesRequest {\n /**\n * IDs or legacy IDs of site payment method types to retrieve.\n * @maxSize 250\n * @minLength 1\n * @maxLength 50\n */\n ids?: string[];\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to filter payment method types and determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface ListSitePaymentMethodTypesResponse {\n /** List of site payment method types. */\n sitePaymentMethodTypes?: SitePaymentMethodType[];\n}\n\ntype SitePaymentMethodTypeNonNullablePaths =\n | `_id`\n | `features.expressFlow.supported`\n | `features.regularFlow.supported`\n | `features.disputes.supported`\n | `features.installments.supported`\n | `features.installments.allowedCountryCodes`\n | `features.refunds.supported`\n | `features.authCapture.supported`\n | `features.regularTokenization.supported`\n | `features.customTokenization.supported`\n | `features.nextAction.iframe.supported`\n | `features.nextAction.newTab.supported`\n | `features.nextAction.fullPageRedirect.supported`\n | `features.nextAction.barcode.supported`\n | `features.nextAction.qrCode.supported`\n | `features.credentialOnFile.supported`\n | `features.moto.supported`\n | `features.promotionalMessages.supported`\n | `merchantFlow.icons`\n | `merchantFlow.icons.${number}.format`\n | `merchantFlow.priority`\n | `merchantFlow.promoted`\n | `merchantFlow.hidden`\n | `merchantFlow.countryRestricted`\n | `buyerFlow.icons`\n | `buyerFlow.icons.${number}.format`\n | `buyerFlow.priority`\n | `buyerFlow.hidden`\n | `buyerFlow.countryRestricted`\n | `brandOnly`\n | `inPerson`\n | `currencyRestricted`\n | `currencyRestrictionEnabled`\n | `allowedCurrencyCodes`;\n\n/**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * @param sitePaymentMethodTypeId - Site payment method type ID.\n * @public\n * @documentationMaturity preview\n * @requiredField sitePaymentMethodTypeId\n * @permissionId PAYMENTS.SITE_PAYMENT_METHOD_TYPE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Requested site payment method type.\n * @fqn wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.GetSitePaymentMethodType\n */\nexport async function getSitePaymentMethodType(\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n): Promise<\n NonNullablePaths<SitePaymentMethodType, SitePaymentMethodTypeNonNullablePaths>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n sitePaymentMethodTypeId: sitePaymentMethodTypeId,\n languageCode: options?.languageCode,\n countryCode: options?.countryCode,\n currencyCode: options?.currencyCode,\n requestedFields: options?.requestedFields,\n });\n\n const reqOpts =\n ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType.getSitePaymentMethodType(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'sitePaymentMethodType.merchantFlow.icons.image' },\n { path: 'sitePaymentMethodType.buyerFlow.icons.image' },\n ],\n },\n ])\n )?.sitePaymentMethodType!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n sitePaymentMethodTypeId: '$[0]',\n languageCode: '$[1].languageCode',\n countryCode: '$[1].countryCode',\n currencyCode: '$[1].currencyCode',\n requestedFields: '$[1].requestedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['sitePaymentMethodTypeId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSitePaymentMethodTypeOptions {\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\n/**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n * @public\n * @documentationMaturity preview\n * @permissionId PAYMENTS.SITE_PAYMENT_METHOD_TYPE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.ListSitePaymentMethodTypes\n */\nexport async function listSitePaymentMethodTypes(\n options?: ListSitePaymentMethodTypesOptions\n): Promise<\n NonNullablePaths<\n ListSitePaymentMethodTypesResponse,\n {\n [P in SitePaymentMethodTypeNonNullablePaths]: `sitePaymentMethodTypes.${number}.${P}`;\n }[SitePaymentMethodTypeNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n ids: options?.ids,\n languageCode: options?.languageCode,\n countryCode: options?.countryCode,\n currencyCode: options?.currencyCode,\n requestedFields: options?.requestedFields,\n });\n\n const reqOpts =\n ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType.listSitePaymentMethodTypes(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'sitePaymentMethodTypes.merchantFlow.icons.image' },\n { path: 'sitePaymentMethodTypes.buyerFlow.icons.image' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n ids: '$[0].ids',\n languageCode: '$[0].languageCode',\n countryCode: '$[0].countryCode',\n currencyCode: '$[0].currencyCode',\n requestedFields: '$[0].requestedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListSitePaymentMethodTypesOptions {\n /**\n * IDs or legacy IDs of site payment method types to retrieve.\n * @maxSize 250\n * @minLength 1\n * @maxLength 50\n */\n ids?: string[];\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to filter payment method types and determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/payment-method-types',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/payments/site-payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier-services._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'events._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'events.wixapps.net': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'invoices._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'pricing-plans.wixapps.net': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'vod-server._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'www.wixhotels.com': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'tpa.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath:\n '/payments/site-payment-method-types/v1/site-payment-method-types',\n destPath: '/v1/site-payment-method-types',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath:\n '/payments/site-payment-method-types/v1/site-payment-method-types',\n destPath: '/v1/site-payment-method-types',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_site-payment-method-types';\n\n/**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n */\nexport function getSitePaymentMethodType(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSitePaymentMethodType({ host }: any) {\n const metadata = {\n entityFqdn:\n 'wix.payments.site_payment_method_types.v1.site_payment_method_type',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.GetSitePaymentMethodType',\n packageName: PACKAGE_NAME,\n url: resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n {\n protoPath: '/v1/site-payment-method-types/{sitePaymentMethodTypeId}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getSitePaymentMethodType;\n}\n\n/**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n */\nexport function listSitePaymentMethodTypes(\n payload: object\n): RequestOptionsFactory<any> {\n function __listSitePaymentMethodTypes({ host }: any) {\n const metadata = {\n entityFqdn:\n 'wix.payments.site_payment_method_types.v1.site_payment_method_type',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.ListSitePaymentMethodTypes',\n packageName: PACKAGE_NAME,\n url: resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n { protoPath: '/v1/site-payment-method-types', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSitePaymentMethodTypes;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n GetSitePaymentMethodTypeOptions,\n ListSitePaymentMethodTypesOptions,\n ListSitePaymentMethodTypesResponse,\n SitePaymentMethodType,\n getSitePaymentMethodType as universalGetSitePaymentMethodType,\n listSitePaymentMethodTypes as universalListSitePaymentMethodTypes,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\nexport function getSitePaymentMethodType(\n httpClient: HttpClient\n): GetSitePaymentMethodTypeSignature {\n return (\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n ) =>\n universalGetSitePaymentMethodType(\n sitePaymentMethodTypeId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetSitePaymentMethodTypeSignature {\n /**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * @param - Site payment method type ID.\n * @returns Requested site payment method type.\n */\n (\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions | undefined\n ): Promise<SitePaymentMethodType>;\n}\n\nexport function listSitePaymentMethodTypes(\n httpClient: HttpClient\n): ListSitePaymentMethodTypesSignature {\n return (options?: ListSitePaymentMethodTypesOptions) =>\n universalListSitePaymentMethodTypes(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListSitePaymentMethodTypesSignature {\n /**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n */\n (\n options?: ListSitePaymentMethodTypesOptions | undefined\n ): Promise<ListSitePaymentMethodTypesResponse>;\n}\n\nexport {\n AuthCapture,\n Barcode,\n BuyerFlow,\n CredentialOnFile,\n CustomTokenization,\n Disputes,\n ExpressFlow,\n Features,\n Format,\n FullPageRedirect,\n GetSitePaymentMethodTypeOptions,\n GetSitePaymentMethodTypeRequest,\n GetSitePaymentMethodTypeResponse,\n IFrame,\n Icon,\n Installments,\n ListSitePaymentMethodTypesOptions,\n ListSitePaymentMethodTypesRequest,\n ListSitePaymentMethodTypesResponse,\n MerchantFlow,\n Moto,\n NewTab,\n NextAction,\n PromotionalMessages,\n QrCode,\n Refunds,\n RegularFlow,\n RegularTokenization,\n RequestedFields,\n SitePaymentMethodType,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n","import {\n getSitePaymentMethodType as publicGetSitePaymentMethodType,\n listSitePaymentMethodTypes as publicListSitePaymentMethodTypes,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getSitePaymentMethodType: MaybeContext<\n BuildRESTFunction<typeof publicGetSitePaymentMethodType> &\n typeof publicGetSitePaymentMethodType\n> = /*#__PURE__*/ createRESTModule(publicGetSitePaymentMethodType);\nexport const listSitePaymentMethodTypes: MaybeContext<\n BuildRESTFunction<typeof publicListSitePaymentMethodTypes> &\n typeof publicListSitePaymentMethodTypes\n> = /*#__PURE__*/ createRESTModule(publicListSitePaymentMethodTypes);\n\nexport {\n Format,\n RequestedFields,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\nexport {\n SitePaymentMethodType,\n Features,\n IFrame,\n NewTab,\n FullPageRedirect,\n Barcode,\n QrCode,\n ExpressFlow,\n RegularFlow,\n Disputes,\n Installments,\n Refunds,\n AuthCapture,\n RegularTokenization,\n CustomTokenization,\n NextAction,\n CredentialOnFile,\n Moto,\n PromotionalMessages,\n MerchantFlow,\n Icon,\n BuyerFlow,\n GetSitePaymentMethodTypeRequest,\n GetSitePaymentMethodTypeResponse,\n ListSitePaymentMethodTypesRequest,\n ListSitePaymentMethodTypesResponse,\n GetSitePaymentMethodTypeOptions,\n ListSitePaymentMethodTypesOptions,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,kCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,0EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,Q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,SAAS;AAAA,IACd,cAAc,SAAS;AAAA,IACvB,aAAa,SAAS;AAAA,IACtB,cAAc,SAAS;AAAA,IACvB,iBAAiB,SAAS;AAAA,EAC5B,CAAC;AAED,QAAM,UAC+D;AAAA,IACjE;AAAA,EACF;AAEF,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO;AAAA,UACL,uCAAe,OAAO,MAAM;AAAA,QAC1B;AAAA,UACE,aAAa;AAAA,UACb,OAAO;AAAA,YACL,EAAE,MAAM,kDAAkD;AAAA,YAC1D,EAAE,MAAM,+CAA+C;AAAA,UACzD;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,KAAK;AAAA,UACL,cAAc;AAAA,UACd,aAAa;AAAA,UACb,cAAc;AAAA,UACd,iBAAiB;AAAA,QACnB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE1mBO,SAASE,0BACd,YACmC;AACnC,SAAO,CACL,yBACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAqBO,SAASC,4BACd,YACqC;AACrC,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACnDA,IAAAC,uBAAiC;AAG1B,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,8BAGK,2DAAiBA,2BAAgC;","names":["getSitePaymentMethodType","listSitePaymentMethodTypes","import_rest_modules","Format","RequestedFields","getSitePaymentMethodType","sdkTransformError","listSitePaymentMethodTypes","getSitePaymentMethodType","listSitePaymentMethodTypes","import_rest_modules","getSitePaymentMethodType","listSitePaymentMethodTypes"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.ts","../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.http.ts","../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.public.ts","../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.context.ts"],"sourcesContent":["export * from './src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.http.js';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** A way to pay online or offline for goods or services offered by a specific site. */\nexport interface SitePaymentMethodType {\n /**\n * Payment method type ID.\n * @format GUID\n * @immutable\n */\n _id?: string;\n /**\n * Value used buy some legacy APIs to refer to this payment method type. Can be empty.\n * @minLength 1\n * @maxLength 50\n * @immutable\n */\n legacyId?: string | null;\n /**\n * Payment method type display name, based on locale.\n *\n * Used by Wix when displaying the payment method type, such as in the payment settings page for merchants, or the checkout page for buyers.\n *\n * Define your locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the descriptions for the `country_code` and `language_code` parameters for those methods.\n * @minLength 1\n * @maxLength 100\n */\n displayName?: string | null;\n /**\n * Payment method type description, based on locale.\n *\n * Used by Wix when displaying the payment method type, such as in the payment settings page for merchants, or the checkout page for buyers.\n *\n * Define your locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the descriptions for the `country_code` and `language_code` parameters for those methods.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n /** Features supported for this payment method type. */\n features?: Features;\n /** Settings that determine if and how to display this payment method type in the merchant flow. The merchant flow is the process a merchant goes through to configure which payment method types they accept on their site. */\n merchantFlow?: MerchantFlow;\n /** Settings that determine if and how to display this payment method type in the buyer flow. The buyer flow is the process a buyer goes through to make a purchase att checkout. */\n buyerFlow?: BuyerFlow;\n /**\n * Whether this payment method type is only used to represent a supported payment brand for another payment method type.\n *\n * For example, a Visa payment method is used to indicate that Visa can be used for credit card transactions. But the Visa payment method type is not used to accept payments. Instead, the credit card payment method type is used.\n *\n * Brand-only payment method types cannot be used to accept payments, and are not listed as a payment method type in a site's dashboard.\n */\n brandOnly?: boolean;\n /** Whether the payment method type can only be used for in-person payments, such as cash, point-of-sale payments, and card readers. */\n inPerson?: boolean;\n /**\n * Time (in seconds after which a transaction is marked as expired if it is not completed.\n *\n * Max: `15552000` (180 days)\n * @min 1\n * @max 15552000\n */\n transactionExpirationDelayInSeconds?: number | null;\n /** Indicates that payment method type is restricted for the provided `currency_code`. */\n currencyRestricted?: boolean;\n /** Indicates the payment method type has currency restriction and it is enabled. */\n currencyRestrictionEnabled?: boolean;\n /**\n * Allowed currencies\n * @maxSize 100\n * @format CURRENCY\n */\n allowedCurrencyCodes?: string[];\n}\n\nexport interface Features {\n /** Express flow configuration. */\n expressFlow?: ExpressFlow;\n /** Regular flow configuration. */\n regularFlow?: RegularFlow;\n /** Disputes configuration. */\n disputes?: Disputes;\n /** Installments configuration. */\n installments?: Installments;\n /** Refunds configuration. */\n refunds?: Refunds;\n /** Authorize and capture configuration. */\n authCapture?: AuthCapture;\n /** Regular tokenization configuration. */\n regularTokenization?: RegularTokenization;\n /** Custom tokenization configuration. */\n customTokenization?: CustomTokenization;\n /** Next action configuration. */\n nextAction?: NextAction;\n /** Credential-on-File (CoF) configuration. */\n credentialOnFile?: CredentialOnFile;\n /** Mail Order/Telephone Order (MOTO) configuration. */\n moto?: Moto;\n /** Promotional message configuration. */\n promotionalMessages?: PromotionalMessages;\n}\n\nexport interface IFrame {\n /** Whether the next payment action can be shown in an iframe. */\n supported?: boolean;\n}\n\nexport interface NewTab {\n /** Whether the next payment action can be shown in a new tab. */\n supported?: boolean;\n}\n\nexport interface FullPageRedirect {\n /** Whether the next payment action can be shown by redirecting to a new page. */\n supported?: boolean;\n}\n\nexport interface Barcode {\n /** Whether the next payment action can be shown as a barcode to scan. */\n supported?: boolean;\n}\n\nexport interface QrCode {\n /** Whether the next payment action can be shown as a QR code to scan. */\n supported?: boolean;\n}\n\nexport interface ExpressFlow {\n /** Whether this payment method type can be used in an express flow on checkout. */\n supported?: boolean;\n}\n\nexport interface RegularFlow {\n /** Whether this payment method type can be used in a regular flow on checkout. */\n supported?: boolean;\n}\n\nexport interface Disputes {\n /** Whether disputes are supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface Installments {\n /** Whether installments are supported for this payment method type. */\n supported?: boolean;\n /**\n * Max number of installments that can be configured by a provider.\n * @min 2\n * @max 36\n */\n maxInstallmentLimit?: number | null;\n /**\n * Countries for which installments can be enabled.\n * @format COUNTRY\n * @minSize 1\n * @maxSize 200\n */\n allowedCountryCodes?: string[];\n}\n\nexport interface Refunds {\n /** Whether refunds are supported for this payment method type. */\n supported?: boolean;\n /**\n * Maximum period in which payments made using this payment method type can be refunded.\n * @min 1\n * @max 365\n */\n maxRefundabilityPeriodInDays?: number | null;\n}\n\nexport interface AuthCapture {\n /** Whether the authorize and capture flow is supported for this payment method type. */\n supported?: boolean;\n /**\n * Period to wait for the auth capture to be completed before canceling the transaction.\n * @min 1\n * @max 365\n */\n maxCapturePeriodInDays?: number | null;\n}\n\nexport interface RegularTokenization {\n /** Whether the default tokenization mechanism can be configured for this payment method type. */\n supported?: boolean;\n}\n\nexport interface CustomTokenization {\n /** Whether a custom tokenization mechanism can be configured for this payment method type, such as a provider-specific tokenization method. */\n supported?: boolean;\n}\n\nexport interface NextAction {\n /** iframe configuration. */\n iframe?: IFrame;\n /** New tab configuration. */\n newTab?: NewTab;\n /** Full page redirect configuration. */\n fullPageRedirect?: FullPageRedirect;\n /** Barcode configuration. */\n barcode?: Barcode;\n /** QR code configuration. */\n qrCode?: QrCode;\n}\n\nexport interface CredentialOnFile {\n /** Whether the Credential-on-File (CoF) feature is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface Moto {\n /** Whether Mail Order/Telephone Order (MOTO) is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface PromotionalMessages {\n /** Whether promotional messages is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface MerchantFlow {\n /**\n * Details about the icons to display for this payment method type on the merchant's Accept Payments page in the site dashboard. Icons are localized according to the locale of the call.\n *\n * Define a locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the method descriptions.\n * @maxSize 200\n */\n icons?: Icon[];\n /**\n * Priority given to this payment method type in the list shown to the merchant.\n * A lower value relative to other payment method types means a higher position on the list.\n * @min 1\n * @max 10000\n */\n priority?: number;\n /** Whether the payment method type is promoted. Promoted payment method types are displayed more prominently on the Accept Payments page. */\n promoted?: boolean;\n /** Whether the merchant cannot choose to accept payments from this payment method type. */\n hidden?: boolean;\n /** Indicates that payment method type is restricted in provided country. */\n countryRestricted?: boolean;\n}\n\n/**\n * Example url:\n * http://images-wixmp-6613fa290e8c1ac70a0297b6.wixmp.com/payment-methods/{domain}/{extension}/{id}.{extension}\n */\nexport interface Icon {\n /** Icon image. */\n image?: string;\n /**\n * Icon tag. Payment method types can have multiple icons, and tags are used to differentiate between them.\n * For example, the UI design for multiple payment method types is upgraded, and now they each have an old icon tagged \"v1\" and a new icon tagged \"v2\". Developers can then easily choose to display all the original \"v1\" style of icons, or all the new \"v2\" style.\n * @minLength 1\n * @maxLength 100\n */\n tag?: string | null;\n /** Icon image format. */\n format?: FormatWithLiterals;\n}\n\nexport enum Format {\n UNKNOWN_FORMAT = 'UNKNOWN_FORMAT',\n SVG = 'SVG',\n PNG = 'PNG',\n}\n\n/** @enumType */\nexport type FormatWithLiterals = Format | 'UNKNOWN_FORMAT' | 'SVG' | 'PNG';\n\nexport interface BuyerFlow {\n /**\n * Details about the icons to display for this payment method type on a site's checkout page. Icons are localized according to the locale of the call.\n *\n * Define a locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the method descriptions.\n * @maxSize 200\n */\n icons?: Icon[];\n /**\n * The priority given to this payment method type in the list of payment method types shown to the buyer.\n * A lower value relative to other payment method types means a higher position on the list.\n * @min 1\n * @max 10000\n */\n priority?: number;\n /** Whether the merchant cannot choose to accept payments from this payment method type. */\n hidden?: boolean;\n /** Indicates that payment method type is restricted in provided country. */\n countryRestricted?: boolean;\n /**\n * Minimum payment amount that can be made with this payment method type.\n * If the request omits `currency_code`, the field is not set because its value depends on the currency.\n * @decimalValue options { maxScale:8, gte:0.00 }\n */\n minPaymentAmount?: string | null;\n}\n\nexport interface GetSitePaymentMethodTypeRequest {\n /**\n * Site payment method type ID.\n * @format GUID\n */\n sitePaymentMethodTypeId: string;\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\nexport enum RequestedFields {\n UNKNOWN_REQUESTED_FIELD = 'UNKNOWN_REQUESTED_FIELD',\n ALLOWED_CURRENCIES = 'ALLOWED_CURRENCIES',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELD'\n | 'ALLOWED_CURRENCIES';\n\nexport interface GetSitePaymentMethodTypeResponse {\n /** Requested site payment method type. */\n sitePaymentMethodType?: SitePaymentMethodType;\n}\n\nexport interface ListSitePaymentMethodTypesRequest {\n /**\n * IDs or legacy IDs of site payment method types to retrieve.\n * @maxSize 250\n * @minLength 1\n * @maxLength 50\n */\n ids?: string[];\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to filter payment method types and determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface ListSitePaymentMethodTypesResponse {\n /** List of site payment method types. */\n sitePaymentMethodTypes?: SitePaymentMethodType[];\n}\n\ntype SitePaymentMethodTypeNonNullablePaths =\n | `_id`\n | `features.expressFlow.supported`\n | `features.regularFlow.supported`\n | `features.disputes.supported`\n | `features.installments.supported`\n | `features.installments.allowedCountryCodes`\n | `features.refunds.supported`\n | `features.authCapture.supported`\n | `features.regularTokenization.supported`\n | `features.customTokenization.supported`\n | `features.nextAction.iframe.supported`\n | `features.nextAction.newTab.supported`\n | `features.nextAction.fullPageRedirect.supported`\n | `features.nextAction.barcode.supported`\n | `features.nextAction.qrCode.supported`\n | `features.credentialOnFile.supported`\n | `features.moto.supported`\n | `features.promotionalMessages.supported`\n | `merchantFlow.icons`\n | `merchantFlow.icons.${number}.format`\n | `merchantFlow.priority`\n | `merchantFlow.promoted`\n | `merchantFlow.hidden`\n | `merchantFlow.countryRestricted`\n | `buyerFlow.icons`\n | `buyerFlow.icons.${number}.format`\n | `buyerFlow.priority`\n | `buyerFlow.hidden`\n | `buyerFlow.countryRestricted`\n | `brandOnly`\n | `inPerson`\n | `currencyRestricted`\n | `currencyRestrictionEnabled`\n | `allowedCurrencyCodes`;\n\n/**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * @param sitePaymentMethodTypeId - Site payment method type ID.\n * @public\n * @documentationMaturity preview\n * @requiredField sitePaymentMethodTypeId\n * @permissionId PAYMENTS.SITE_PAYMENT_METHOD_TYPE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Requested site payment method type.\n * @fqn wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.GetSitePaymentMethodType\n */\nexport async function getSitePaymentMethodType(\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n): Promise<\n NonNullablePaths<SitePaymentMethodType, SitePaymentMethodTypeNonNullablePaths>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n sitePaymentMethodTypeId: sitePaymentMethodTypeId,\n languageCode: options?.languageCode,\n countryCode: options?.countryCode,\n currencyCode: options?.currencyCode,\n requestedFields: options?.requestedFields,\n });\n\n const reqOpts =\n ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType.getSitePaymentMethodType(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'sitePaymentMethodType.merchantFlow.icons.image' },\n { path: 'sitePaymentMethodType.buyerFlow.icons.image' },\n ],\n },\n ])\n )?.sitePaymentMethodType!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n sitePaymentMethodTypeId: '$[0]',\n languageCode: '$[1].languageCode',\n countryCode: '$[1].countryCode',\n currencyCode: '$[1].currencyCode',\n requestedFields: '$[1].requestedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['sitePaymentMethodTypeId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSitePaymentMethodTypeOptions {\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\n/**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n * @public\n * @documentationMaturity preview\n * @permissionId PAYMENTS.SITE_PAYMENT_METHOD_TYPE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.ListSitePaymentMethodTypes\n */\nexport async function listSitePaymentMethodTypes(\n options?: ListSitePaymentMethodTypesOptions\n): Promise<\n NonNullablePaths<\n ListSitePaymentMethodTypesResponse,\n {\n [P in SitePaymentMethodTypeNonNullablePaths]: `sitePaymentMethodTypes.${number}.${P}`;\n }[SitePaymentMethodTypeNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n ids: options?.ids,\n languageCode: options?.languageCode,\n countryCode: options?.countryCode,\n currencyCode: options?.currencyCode,\n requestedFields: options?.requestedFields,\n });\n\n const reqOpts =\n ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType.listSitePaymentMethodTypes(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'sitePaymentMethodTypes.merchantFlow.icons.image' },\n { path: 'sitePaymentMethodTypes.buyerFlow.icons.image' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n ids: '$[0].ids',\n languageCode: '$[0].languageCode',\n countryCode: '$[0].countryCode',\n currencyCode: '$[0].currencyCode',\n requestedFields: '$[0].requestedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListSitePaymentMethodTypesOptions {\n /**\n * IDs or legacy IDs of site payment method types to retrieve.\n * @maxSize 250\n * @minLength 1\n * @maxLength 50\n */\n ids?: string[];\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to filter payment method types and determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/payment-method-types',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/payments/site-payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier-services._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'events._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'events.wixapps.net': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'invoices._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'pricing-plans.wixapps.net': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'vod-server._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'www.wixhotels.com': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'tpa.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath:\n '/payments/site-payment-method-types/v1/site-payment-method-types',\n destPath: '/v1/site-payment-method-types',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath:\n '/payments/site-payment-method-types/v1/site-payment-method-types',\n destPath: '/v1/site-payment-method-types',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_site-payment-method-types';\n\n/**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n */\nexport function getSitePaymentMethodType(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSitePaymentMethodType({ host }: any) {\n const metadata = {\n entityFqdn:\n 'wix.payments.site_payment_method_types.v1.site_payment_method_type',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.GetSitePaymentMethodType',\n packageName: PACKAGE_NAME,\n url: resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n {\n protoPath: '/v1/site-payment-method-types/{sitePaymentMethodTypeId}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getSitePaymentMethodType;\n}\n\n/**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n */\nexport function listSitePaymentMethodTypes(\n payload: object\n): RequestOptionsFactory<any> {\n function __listSitePaymentMethodTypes({ host }: any) {\n const metadata = {\n entityFqdn:\n 'wix.payments.site_payment_method_types.v1.site_payment_method_type',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.ListSitePaymentMethodTypes',\n packageName: PACKAGE_NAME,\n url: resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n { protoPath: '/v1/site-payment-method-types', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSitePaymentMethodTypes;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetSitePaymentMethodTypeOptions,\n ListSitePaymentMethodTypesOptions,\n ListSitePaymentMethodTypesResponse,\n SitePaymentMethodType,\n getSitePaymentMethodType as universalGetSitePaymentMethodType,\n listSitePaymentMethodTypes as universalListSitePaymentMethodTypes,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\ntype SitePaymentMethodTypeNonNullablePaths =\n | `_id`\n | `features.expressFlow.supported`\n | `features.regularFlow.supported`\n | `features.disputes.supported`\n | `features.installments.supported`\n | `features.installments.allowedCountryCodes`\n | `features.refunds.supported`\n | `features.authCapture.supported`\n | `features.regularTokenization.supported`\n | `features.customTokenization.supported`\n | `features.nextAction.iframe.supported`\n | `features.nextAction.newTab.supported`\n | `features.nextAction.fullPageRedirect.supported`\n | `features.nextAction.barcode.supported`\n | `features.nextAction.qrCode.supported`\n | `features.credentialOnFile.supported`\n | `features.moto.supported`\n | `features.promotionalMessages.supported`\n | `merchantFlow.icons`\n | `merchantFlow.icons.${number}.format`\n | `merchantFlow.priority`\n | `merchantFlow.promoted`\n | `merchantFlow.hidden`\n | `merchantFlow.countryRestricted`\n | `buyerFlow.icons`\n | `buyerFlow.icons.${number}.format`\n | `buyerFlow.priority`\n | `buyerFlow.hidden`\n | `buyerFlow.countryRestricted`\n | `brandOnly`\n | `inPerson`\n | `currencyRestricted`\n | `currencyRestrictionEnabled`\n | `allowedCurrencyCodes`;\n\nexport function getSitePaymentMethodType(\n httpClient: HttpClient\n): GetSitePaymentMethodTypeSignature {\n return (\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n ) =>\n universalGetSitePaymentMethodType(\n sitePaymentMethodTypeId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetSitePaymentMethodTypeSignature {\n /**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * @param - Site payment method type ID.\n * @returns Requested site payment method type.\n */\n (\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n ): Promise<\n NonNullablePaths<\n SitePaymentMethodType,\n SitePaymentMethodTypeNonNullablePaths\n >\n >;\n}\n\nexport function listSitePaymentMethodTypes(\n httpClient: HttpClient\n): ListSitePaymentMethodTypesSignature {\n return (options?: ListSitePaymentMethodTypesOptions) =>\n universalListSitePaymentMethodTypes(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListSitePaymentMethodTypesSignature {\n /**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n */\n (options?: ListSitePaymentMethodTypesOptions): Promise<\n NonNullablePaths<\n ListSitePaymentMethodTypesResponse,\n {\n [P in SitePaymentMethodTypeNonNullablePaths]: `sitePaymentMethodTypes.${number}.${P}`;\n }[SitePaymentMethodTypeNonNullablePaths]\n >\n >;\n}\n\nexport {\n AuthCapture,\n Barcode,\n BuyerFlow,\n CredentialOnFile,\n CustomTokenization,\n Disputes,\n ExpressFlow,\n Features,\n Format,\n FullPageRedirect,\n GetSitePaymentMethodTypeOptions,\n GetSitePaymentMethodTypeRequest,\n GetSitePaymentMethodTypeResponse,\n IFrame,\n Icon,\n Installments,\n ListSitePaymentMethodTypesOptions,\n ListSitePaymentMethodTypesRequest,\n ListSitePaymentMethodTypesResponse,\n MerchantFlow,\n Moto,\n NewTab,\n NextAction,\n PromotionalMessages,\n QrCode,\n Refunds,\n RegularFlow,\n RegularTokenization,\n RequestedFields,\n SitePaymentMethodType,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n","import {\n getSitePaymentMethodType as publicGetSitePaymentMethodType,\n listSitePaymentMethodTypes as publicListSitePaymentMethodTypes,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getSitePaymentMethodType: MaybeContext<\n BuildRESTFunction<typeof publicGetSitePaymentMethodType> &\n typeof publicGetSitePaymentMethodType\n> = /*#__PURE__*/ createRESTModule(publicGetSitePaymentMethodType);\nexport const listSitePaymentMethodTypes: MaybeContext<\n BuildRESTFunction<typeof publicListSitePaymentMethodTypes> &\n typeof publicListSitePaymentMethodTypes\n> = /*#__PURE__*/ createRESTModule(publicListSitePaymentMethodTypes);\n\nexport {\n Format,\n RequestedFields,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\nexport {\n SitePaymentMethodType,\n Features,\n IFrame,\n NewTab,\n FullPageRedirect,\n Barcode,\n QrCode,\n ExpressFlow,\n RegularFlow,\n Disputes,\n Installments,\n Refunds,\n AuthCapture,\n RegularTokenization,\n CustomTokenization,\n NextAction,\n CredentialOnFile,\n Moto,\n PromotionalMessages,\n MerchantFlow,\n Icon,\n BuyerFlow,\n GetSitePaymentMethodTypeRequest,\n GetSitePaymentMethodTypeResponse,\n ListSitePaymentMethodTypesRequest,\n ListSitePaymentMethodTypesResponse,\n GetSitePaymentMethodTypeOptions,\n ListSitePaymentMethodTypesOptions,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,kCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,0EACP,MACA;AACA,QAA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A,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,KAAK;AAAA,UACL,cAAc;AAAA,UACd,aAAa;AAAA,UACb,cAAc;AAAA,UACd,iBAAiB;AAAA,QACnB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEtkBO,SAASE,0BACd,YACmC;AACnC,SAAO,CACL,yBACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA0BO,SAASC,4BACd,YACqC;AACrC,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC5FA,IAAAC,uBAAiC;AAG1B,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,8BAGK,2DAAiBA,2BAAgC;","names":["getSitePaymentMethodType","listSitePaymentMethodTypes","import_rest_modules","Format","RequestedFields","getSitePaymentMethodType","sdkTransformError","listSitePaymentMethodTypes","getSitePaymentMethodType","listSitePaymentMethodTypes","import_rest_modules","getSitePaymentMethodType","listSitePaymentMethodTypes"]}
|
package/build/es/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
1
|
+
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
2
|
import { GetSitePaymentMethodTypeOptions, SitePaymentMethodType, ListSitePaymentMethodTypesOptions, ListSitePaymentMethodTypesResponse } from './index.typings.mjs';
|
|
3
3
|
export { AuthCapture, Barcode, BuyerFlow, CredentialOnFile, CustomTokenization, Disputes, ExpressFlow, Features, Format, FullPageRedirect, GetSitePaymentMethodTypeRequest, GetSitePaymentMethodTypeResponse, IFrame, Icon, Installments, ListSitePaymentMethodTypesRequest, MerchantFlow, Moto, NewTab, NextAction, PromotionalMessages, QrCode, Refunds, RegularFlow, RegularTokenization, RequestedFields } from './index.typings.mjs';
|
|
4
4
|
|
|
5
|
+
type SitePaymentMethodTypeNonNullablePaths = `_id` | `features.expressFlow.supported` | `features.regularFlow.supported` | `features.disputes.supported` | `features.installments.supported` | `features.installments.allowedCountryCodes` | `features.refunds.supported` | `features.authCapture.supported` | `features.regularTokenization.supported` | `features.customTokenization.supported` | `features.nextAction.iframe.supported` | `features.nextAction.newTab.supported` | `features.nextAction.fullPageRedirect.supported` | `features.nextAction.barcode.supported` | `features.nextAction.qrCode.supported` | `features.credentialOnFile.supported` | `features.moto.supported` | `features.promotionalMessages.supported` | `merchantFlow.icons` | `merchantFlow.icons.${number}.format` | `merchantFlow.priority` | `merchantFlow.promoted` | `merchantFlow.hidden` | `merchantFlow.countryRestricted` | `buyerFlow.icons` | `buyerFlow.icons.${number}.format` | `buyerFlow.priority` | `buyerFlow.hidden` | `buyerFlow.countryRestricted` | `brandOnly` | `inPerson` | `currencyRestricted` | `currencyRestrictionEnabled` | `allowedCurrencyCodes`;
|
|
5
6
|
declare function getSitePaymentMethodType$1(httpClient: HttpClient): GetSitePaymentMethodTypeSignature;
|
|
6
7
|
interface GetSitePaymentMethodTypeSignature {
|
|
7
8
|
/**
|
|
@@ -16,7 +17,7 @@ interface GetSitePaymentMethodTypeSignature {
|
|
|
16
17
|
* @param - Site payment method type ID.
|
|
17
18
|
* @returns Requested site payment method type.
|
|
18
19
|
*/
|
|
19
|
-
(sitePaymentMethodTypeId: string, options?: GetSitePaymentMethodTypeOptions
|
|
20
|
+
(sitePaymentMethodTypeId: string, options?: GetSitePaymentMethodTypeOptions): Promise<NonNullablePaths<SitePaymentMethodType, SitePaymentMethodTypeNonNullablePaths>>;
|
|
20
21
|
}
|
|
21
22
|
declare function listSitePaymentMethodTypes$1(httpClient: HttpClient): ListSitePaymentMethodTypesSignature;
|
|
22
23
|
interface ListSitePaymentMethodTypesSignature {
|
|
@@ -34,7 +35,9 @@ interface ListSitePaymentMethodTypesSignature {
|
|
|
34
35
|
* Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.
|
|
35
36
|
* `currency` is used to determine the eligibility of payment method types for the provided currency.
|
|
36
37
|
*/
|
|
37
|
-
(options?: ListSitePaymentMethodTypesOptions
|
|
38
|
+
(options?: ListSitePaymentMethodTypesOptions): Promise<NonNullablePaths<ListSitePaymentMethodTypesResponse, {
|
|
39
|
+
[P in SitePaymentMethodTypeNonNullablePaths]: `sitePaymentMethodTypes.${number}.${P}`;
|
|
40
|
+
}[SitePaymentMethodTypeNonNullablePaths]>>;
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
declare const getSitePaymentMethodType: MaybeContext<BuildRESTFunction<typeof getSitePaymentMethodType$1> & typeof getSitePaymentMethodType$1>;
|
package/build/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.ts","../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.http.ts","../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.public.ts","../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.http.js';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** A way to pay online or offline for goods or services offered by a specific site. */\nexport interface SitePaymentMethodType {\n /**\n * Payment method type ID.\n * @format GUID\n * @immutable\n */\n _id?: string;\n /**\n * Value used buy some legacy APIs to refer to this payment method type. Can be empty.\n * @minLength 1\n * @maxLength 50\n * @immutable\n */\n legacyId?: string | null;\n /**\n * Payment method type display name, based on locale.\n *\n * Used by Wix when displaying the payment method type, such as in the payment settings page for merchants, or the checkout page for buyers.\n *\n * Define your locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the descriptions for the `country_code` and `language_code` parameters for those methods.\n * @minLength 1\n * @maxLength 100\n */\n displayName?: string | null;\n /**\n * Payment method type description, based on locale.\n *\n * Used by Wix when displaying the payment method type, such as in the payment settings page for merchants, or the checkout page for buyers.\n *\n * Define your locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the descriptions for the `country_code` and `language_code` parameters for those methods.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n /** Features supported for this payment method type. */\n features?: Features;\n /** Settings that determine if and how to display this payment method type in the merchant flow. The merchant flow is the process a merchant goes through to configure which payment method types they accept on their site. */\n merchantFlow?: MerchantFlow;\n /** Settings that determine if and how to display this payment method type in the buyer flow. The buyer flow is the process a buyer goes through to make a purchase att checkout. */\n buyerFlow?: BuyerFlow;\n /**\n * Whether this payment method type is only used to represent a supported payment brand for another payment method type.\n *\n * For example, a Visa payment method is used to indicate that Visa can be used for credit card transactions. But the Visa payment method type is not used to accept payments. Instead, the credit card payment method type is used.\n *\n * Brand-only payment method types cannot be used to accept payments, and are not listed as a payment method type in a site's dashboard.\n */\n brandOnly?: boolean;\n /** Whether the payment method type can only be used for in-person payments, such as cash, point-of-sale payments, and card readers. */\n inPerson?: boolean;\n /**\n * Time (in seconds after which a transaction is marked as expired if it is not completed.\n *\n * Max: `15552000` (180 days)\n * @min 1\n * @max 15552000\n */\n transactionExpirationDelayInSeconds?: number | null;\n /** Indicates that payment method type is restricted for the provided `currency_code`. */\n currencyRestricted?: boolean;\n /** Indicates the payment method type has currency restriction and it is enabled. */\n currencyRestrictionEnabled?: boolean;\n /**\n * Allowed currencies\n * @maxSize 100\n * @format CURRENCY\n */\n allowedCurrencyCodes?: string[];\n}\n\nexport interface Features {\n /** Express flow configuration. */\n expressFlow?: ExpressFlow;\n /** Regular flow configuration. */\n regularFlow?: RegularFlow;\n /** Disputes configuration. */\n disputes?: Disputes;\n /** Installments configuration. */\n installments?: Installments;\n /** Refunds configuration. */\n refunds?: Refunds;\n /** Authorize and capture configuration. */\n authCapture?: AuthCapture;\n /** Regular tokenization configuration. */\n regularTokenization?: RegularTokenization;\n /** Custom tokenization configuration. */\n customTokenization?: CustomTokenization;\n /** Next action configuration. */\n nextAction?: NextAction;\n /** Credential-on-File (CoF) configuration. */\n credentialOnFile?: CredentialOnFile;\n /** Mail Order/Telephone Order (MOTO) configuration. */\n moto?: Moto;\n /** Promotional message configuration. */\n promotionalMessages?: PromotionalMessages;\n}\n\nexport interface IFrame {\n /** Whether the next payment action can be shown in an iframe. */\n supported?: boolean;\n}\n\nexport interface NewTab {\n /** Whether the next payment action can be shown in a new tab. */\n supported?: boolean;\n}\n\nexport interface FullPageRedirect {\n /** Whether the next payment action can be shown by redirecting to a new page. */\n supported?: boolean;\n}\n\nexport interface Barcode {\n /** Whether the next payment action can be shown as a barcode to scan. */\n supported?: boolean;\n}\n\nexport interface QrCode {\n /** Whether the next payment action can be shown as a QR code to scan. */\n supported?: boolean;\n}\n\nexport interface ExpressFlow {\n /** Whether this payment method type can be used in an express flow on checkout. */\n supported?: boolean;\n}\n\nexport interface RegularFlow {\n /** Whether this payment method type can be used in a regular flow on checkout. */\n supported?: boolean;\n}\n\nexport interface Disputes {\n /** Whether disputes are supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface Installments {\n /** Whether installments are supported for this payment method type. */\n supported?: boolean;\n /**\n * Max number of installments that can be configured by a provider.\n * @min 2\n * @max 36\n */\n maxInstallmentLimit?: number | null;\n /**\n * Countries for which installments can be enabled.\n * @format COUNTRY\n * @minSize 1\n * @maxSize 200\n */\n allowedCountryCodes?: string[];\n}\n\nexport interface Refunds {\n /** Whether refunds are supported for this payment method type. */\n supported?: boolean;\n /**\n * Maximum period in which payments made using this payment method type can be refunded.\n * @min 1\n * @max 365\n */\n maxRefundabilityPeriodInDays?: number | null;\n}\n\nexport interface AuthCapture {\n /** Whether the authorize and capture flow is supported for this payment method type. */\n supported?: boolean;\n /**\n * Period to wait for the auth capture to be completed before canceling the transaction.\n * @min 1\n * @max 365\n */\n maxCapturePeriodInDays?: number | null;\n}\n\nexport interface RegularTokenization {\n /** Whether the default tokenization mechanism can be configured for this payment method type. */\n supported?: boolean;\n}\n\nexport interface CustomTokenization {\n /** Whether a custom tokenization mechanism can be configured for this payment method type, such as a provider-specific tokenization method. */\n supported?: boolean;\n}\n\nexport interface NextAction {\n /** iframe configuration. */\n iframe?: IFrame;\n /** New tab configuration. */\n newTab?: NewTab;\n /** Full page redirect configuration. */\n fullPageRedirect?: FullPageRedirect;\n /** Barcode configuration. */\n barcode?: Barcode;\n /** QR code configuration. */\n qrCode?: QrCode;\n}\n\nexport interface CredentialOnFile {\n /** Whether the Credential-on-File (CoF) feature is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface Moto {\n /** Whether Mail Order/Telephone Order (MOTO) is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface PromotionalMessages {\n /** Whether promotional messages is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface MerchantFlow {\n /**\n * Details about the icons to display for this payment method type on the merchant's Accept Payments page in the site dashboard. Icons are localized according to the locale of the call.\n *\n * Define a locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the method descriptions.\n * @maxSize 200\n */\n icons?: Icon[];\n /**\n * Priority given to this payment method type in the list shown to the merchant.\n * A lower value relative to other payment method types means a higher position on the list.\n * @min 1\n * @max 10000\n */\n priority?: number;\n /** Whether the payment method type is promoted. Promoted payment method types are displayed more prominently on the Accept Payments page. */\n promoted?: boolean;\n /** Whether the merchant cannot choose to accept payments from this payment method type. */\n hidden?: boolean;\n /** Indicates that payment method type is restricted in provided country. */\n countryRestricted?: boolean;\n}\n\n/**\n * Example url:\n * http://images-wixmp-6613fa290e8c1ac70a0297b6.wixmp.com/payment-methods/{domain}/{extension}/{id}.{extension}\n */\nexport interface Icon {\n /** Icon image. */\n image?: string;\n /**\n * Icon tag. Payment method types can have multiple icons, and tags are used to differentiate between them.\n * For example, the UI design for multiple payment method types is upgraded, and now they each have an old icon tagged \"v1\" and a new icon tagged \"v2\". Developers can then easily choose to display all the original \"v1\" style of icons, or all the new \"v2\" style.\n * @minLength 1\n * @maxLength 100\n */\n tag?: string | null;\n /** Icon image format. */\n format?: FormatWithLiterals;\n}\n\nexport enum Format {\n UNKNOWN_FORMAT = 'UNKNOWN_FORMAT',\n SVG = 'SVG',\n PNG = 'PNG',\n}\n\n/** @enumType */\nexport type FormatWithLiterals = Format | 'UNKNOWN_FORMAT' | 'SVG' | 'PNG';\n\nexport interface BuyerFlow {\n /**\n * Details about the icons to display for this payment method type on a site's checkout page. Icons are localized according to the locale of the call.\n *\n * Define a locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the method descriptions.\n * @maxSize 200\n */\n icons?: Icon[];\n /**\n * The priority given to this payment method type in the list of payment method types shown to the buyer.\n * A lower value relative to other payment method types means a higher position on the list.\n * @min 1\n * @max 10000\n */\n priority?: number;\n /** Whether the merchant cannot choose to accept payments from this payment method type. */\n hidden?: boolean;\n /** Indicates that payment method type is restricted in provided country. */\n countryRestricted?: boolean;\n /**\n * Minimum payment amount that can be made with this payment method type.\n * If the request omits `currency_code`, the field is not set because its value depends on the currency.\n * @decimalValue options { maxScale:8, gte:0.00 }\n */\n minPaymentAmount?: string | null;\n}\n\nexport interface GetSitePaymentMethodTypeRequest {\n /**\n * Site payment method type ID.\n * @format GUID\n */\n sitePaymentMethodTypeId: string;\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\nexport enum RequestedFields {\n UNKNOWN_REQUESTED_FIELD = 'UNKNOWN_REQUESTED_FIELD',\n ALLOWED_CURRENCIES = 'ALLOWED_CURRENCIES',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELD'\n | 'ALLOWED_CURRENCIES';\n\nexport interface GetSitePaymentMethodTypeResponse {\n /** Requested site payment method type. */\n sitePaymentMethodType?: SitePaymentMethodType;\n}\n\nexport interface ListSitePaymentMethodTypesRequest {\n /**\n * IDs or legacy IDs of site payment method types to retrieve.\n * @maxSize 250\n * @minLength 1\n * @maxLength 50\n */\n ids?: string[];\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to filter payment method types and determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface ListSitePaymentMethodTypesResponse {\n /** List of site payment method types. */\n sitePaymentMethodTypes?: SitePaymentMethodType[];\n}\n\ntype SitePaymentMethodTypeNonNullablePaths =\n | `_id`\n | `features.expressFlow.supported`\n | `features.regularFlow.supported`\n | `features.disputes.supported`\n | `features.installments.supported`\n | `features.installments.allowedCountryCodes`\n | `features.refunds.supported`\n | `features.authCapture.supported`\n | `features.regularTokenization.supported`\n | `features.customTokenization.supported`\n | `features.nextAction.iframe.supported`\n | `features.nextAction.newTab.supported`\n | `features.nextAction.fullPageRedirect.supported`\n | `features.nextAction.barcode.supported`\n | `features.nextAction.qrCode.supported`\n | `features.credentialOnFile.supported`\n | `features.moto.supported`\n | `features.promotionalMessages.supported`\n | `merchantFlow.icons`\n | `merchantFlow.icons.${number}.format`\n | `merchantFlow.priority`\n | `merchantFlow.promoted`\n | `merchantFlow.hidden`\n | `merchantFlow.countryRestricted`\n | `buyerFlow.icons`\n | `buyerFlow.icons.${number}.format`\n | `buyerFlow.priority`\n | `buyerFlow.hidden`\n | `buyerFlow.countryRestricted`\n | `brandOnly`\n | `inPerson`\n | `currencyRestricted`\n | `currencyRestrictionEnabled`\n | `allowedCurrencyCodes`;\n\n/**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * @param sitePaymentMethodTypeId - Site payment method type ID.\n * @public\n * @documentationMaturity preview\n * @requiredField sitePaymentMethodTypeId\n * @permissionId PAYMENTS.SITE_PAYMENT_METHOD_TYPE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Requested site payment method type.\n * @fqn wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.GetSitePaymentMethodType\n */\nexport async function getSitePaymentMethodType(\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n): Promise<\n NonNullablePaths<SitePaymentMethodType, SitePaymentMethodTypeNonNullablePaths>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n sitePaymentMethodTypeId: sitePaymentMethodTypeId,\n languageCode: options?.languageCode,\n countryCode: options?.countryCode,\n currencyCode: options?.currencyCode,\n requestedFields: options?.requestedFields,\n });\n\n const reqOpts =\n ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType.getSitePaymentMethodType(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'sitePaymentMethodType.merchantFlow.icons.image' },\n { path: 'sitePaymentMethodType.buyerFlow.icons.image' },\n ],\n },\n ])\n )?.sitePaymentMethodType!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n sitePaymentMethodTypeId: '$[0]',\n languageCode: '$[1].languageCode',\n countryCode: '$[1].countryCode',\n currencyCode: '$[1].currencyCode',\n requestedFields: '$[1].requestedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['sitePaymentMethodTypeId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSitePaymentMethodTypeOptions {\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\n/**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n * @public\n * @documentationMaturity preview\n * @permissionId PAYMENTS.SITE_PAYMENT_METHOD_TYPE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.ListSitePaymentMethodTypes\n */\nexport async function listSitePaymentMethodTypes(\n options?: ListSitePaymentMethodTypesOptions\n): Promise<\n NonNullablePaths<\n ListSitePaymentMethodTypesResponse,\n {\n [P in SitePaymentMethodTypeNonNullablePaths]: `sitePaymentMethodTypes.${number}.${P}`;\n }[SitePaymentMethodTypeNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n ids: options?.ids,\n languageCode: options?.languageCode,\n countryCode: options?.countryCode,\n currencyCode: options?.currencyCode,\n requestedFields: options?.requestedFields,\n });\n\n const reqOpts =\n ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType.listSitePaymentMethodTypes(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'sitePaymentMethodTypes.merchantFlow.icons.image' },\n { path: 'sitePaymentMethodTypes.buyerFlow.icons.image' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n ids: '$[0].ids',\n languageCode: '$[0].languageCode',\n countryCode: '$[0].countryCode',\n currencyCode: '$[0].currencyCode',\n requestedFields: '$[0].requestedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListSitePaymentMethodTypesOptions {\n /**\n * IDs or legacy IDs of site payment method types to retrieve.\n * @maxSize 250\n * @minLength 1\n * @maxLength 50\n */\n ids?: string[];\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to filter payment method types and determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/payment-method-types',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/payments/site-payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier-services._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'events._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'events.wixapps.net': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'invoices._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'pricing-plans.wixapps.net': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'vod-server._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'www.wixhotels.com': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'tpa.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath:\n '/payments/site-payment-method-types/v1/site-payment-method-types',\n destPath: '/v1/site-payment-method-types',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath:\n '/payments/site-payment-method-types/v1/site-payment-method-types',\n destPath: '/v1/site-payment-method-types',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_site-payment-method-types';\n\n/**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n */\nexport function getSitePaymentMethodType(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSitePaymentMethodType({ host }: any) {\n const metadata = {\n entityFqdn:\n 'wix.payments.site_payment_method_types.v1.site_payment_method_type',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.GetSitePaymentMethodType',\n packageName: PACKAGE_NAME,\n url: resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n {\n protoPath: '/v1/site-payment-method-types/{sitePaymentMethodTypeId}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getSitePaymentMethodType;\n}\n\n/**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n */\nexport function listSitePaymentMethodTypes(\n payload: object\n): RequestOptionsFactory<any> {\n function __listSitePaymentMethodTypes({ host }: any) {\n const metadata = {\n entityFqdn:\n 'wix.payments.site_payment_method_types.v1.site_payment_method_type',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.ListSitePaymentMethodTypes',\n packageName: PACKAGE_NAME,\n url: resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n { protoPath: '/v1/site-payment-method-types', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSitePaymentMethodTypes;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n GetSitePaymentMethodTypeOptions,\n ListSitePaymentMethodTypesOptions,\n ListSitePaymentMethodTypesResponse,\n SitePaymentMethodType,\n getSitePaymentMethodType as universalGetSitePaymentMethodType,\n listSitePaymentMethodTypes as universalListSitePaymentMethodTypes,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\nexport function getSitePaymentMethodType(\n httpClient: HttpClient\n): GetSitePaymentMethodTypeSignature {\n return (\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n ) =>\n universalGetSitePaymentMethodType(\n sitePaymentMethodTypeId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetSitePaymentMethodTypeSignature {\n /**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * @param - Site payment method type ID.\n * @returns Requested site payment method type.\n */\n (\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions | undefined\n ): Promise<SitePaymentMethodType>;\n}\n\nexport function listSitePaymentMethodTypes(\n httpClient: HttpClient\n): ListSitePaymentMethodTypesSignature {\n return (options?: ListSitePaymentMethodTypesOptions) =>\n universalListSitePaymentMethodTypes(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListSitePaymentMethodTypesSignature {\n /**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n */\n (\n options?: ListSitePaymentMethodTypesOptions | undefined\n ): Promise<ListSitePaymentMethodTypesResponse>;\n}\n\nexport {\n AuthCapture,\n Barcode,\n BuyerFlow,\n CredentialOnFile,\n CustomTokenization,\n Disputes,\n ExpressFlow,\n Features,\n Format,\n FullPageRedirect,\n GetSitePaymentMethodTypeOptions,\n GetSitePaymentMethodTypeRequest,\n GetSitePaymentMethodTypeResponse,\n IFrame,\n Icon,\n Installments,\n ListSitePaymentMethodTypesOptions,\n ListSitePaymentMethodTypesRequest,\n ListSitePaymentMethodTypesResponse,\n MerchantFlow,\n Moto,\n NewTab,\n NextAction,\n PromotionalMessages,\n QrCode,\n Refunds,\n RegularFlow,\n RegularTokenization,\n RequestedFields,\n SitePaymentMethodType,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n","import {\n getSitePaymentMethodType as publicGetSitePaymentMethodType,\n listSitePaymentMethodTypes as publicListSitePaymentMethodTypes,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getSitePaymentMethodType: MaybeContext<\n BuildRESTFunction<typeof publicGetSitePaymentMethodType> &\n typeof publicGetSitePaymentMethodType\n> = /*#__PURE__*/ createRESTModule(publicGetSitePaymentMethodType);\nexport const listSitePaymentMethodTypes: MaybeContext<\n BuildRESTFunction<typeof publicListSitePaymentMethodTypes> &\n typeof publicListSitePaymentMethodTypes\n> = /*#__PURE__*/ createRESTModule(publicListSitePaymentMethodTypes);\n\nexport {\n Format,\n RequestedFields,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\nexport {\n SitePaymentMethodType,\n Features,\n IFrame,\n NewTab,\n FullPageRedirect,\n Barcode,\n QrCode,\n ExpressFlow,\n RegularFlow,\n Disputes,\n Installments,\n Refunds,\n AuthCapture,\n RegularTokenization,\n CustomTokenization,\n NextAction,\n CredentialOnFile,\n Moto,\n PromotionalMessages,\n MerchantFlow,\n Icon,\n BuyerFlow,\n GetSitePaymentMethodTypeRequest,\n GetSitePaymentMethodTypeResponse,\n ListSitePaymentMethodTypesRequest,\n ListSitePaymentMethodTypesResponse,\n GetSitePaymentMethodTypeOptions,\n ListSitePaymentMethodTypesOptions,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,0EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA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;AACnC,SAAO,CACL,yBACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAqBO,SAASC,4BACd,YACqC;AACrC,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACnDA,SAAS,wBAAwB;AAG1B,IAAMC,4BAGK,iCAAiBA,yBAA8B;AAC1D,IAAMC,8BAGK,iCAAiBA,2BAAgC;","names":["Format","RequestedFields","getSitePaymentMethodType","listSitePaymentMethodTypes","getSitePaymentMethodType","listSitePaymentMethodTypes","getSitePaymentMethodType","listSitePaymentMethodTypes"]}
|
|
1
|
+
{"version":3,"sources":["../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.ts","../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.http.ts","../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.public.ts","../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.http.js';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** A way to pay online or offline for goods or services offered by a specific site. */\nexport interface SitePaymentMethodType {\n /**\n * Payment method type ID.\n * @format GUID\n * @immutable\n */\n _id?: string;\n /**\n * Value used buy some legacy APIs to refer to this payment method type. Can be empty.\n * @minLength 1\n * @maxLength 50\n * @immutable\n */\n legacyId?: string | null;\n /**\n * Payment method type display name, based on locale.\n *\n * Used by Wix when displaying the payment method type, such as in the payment settings page for merchants, or the checkout page for buyers.\n *\n * Define your locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the descriptions for the `country_code` and `language_code` parameters for those methods.\n * @minLength 1\n * @maxLength 100\n */\n displayName?: string | null;\n /**\n * Payment method type description, based on locale.\n *\n * Used by Wix when displaying the payment method type, such as in the payment settings page for merchants, or the checkout page for buyers.\n *\n * Define your locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the descriptions for the `country_code` and `language_code` parameters for those methods.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n /** Features supported for this payment method type. */\n features?: Features;\n /** Settings that determine if and how to display this payment method type in the merchant flow. The merchant flow is the process a merchant goes through to configure which payment method types they accept on their site. */\n merchantFlow?: MerchantFlow;\n /** Settings that determine if and how to display this payment method type in the buyer flow. The buyer flow is the process a buyer goes through to make a purchase att checkout. */\n buyerFlow?: BuyerFlow;\n /**\n * Whether this payment method type is only used to represent a supported payment brand for another payment method type.\n *\n * For example, a Visa payment method is used to indicate that Visa can be used for credit card transactions. But the Visa payment method type is not used to accept payments. Instead, the credit card payment method type is used.\n *\n * Brand-only payment method types cannot be used to accept payments, and are not listed as a payment method type in a site's dashboard.\n */\n brandOnly?: boolean;\n /** Whether the payment method type can only be used for in-person payments, such as cash, point-of-sale payments, and card readers. */\n inPerson?: boolean;\n /**\n * Time (in seconds after which a transaction is marked as expired if it is not completed.\n *\n * Max: `15552000` (180 days)\n * @min 1\n * @max 15552000\n */\n transactionExpirationDelayInSeconds?: number | null;\n /** Indicates that payment method type is restricted for the provided `currency_code`. */\n currencyRestricted?: boolean;\n /** Indicates the payment method type has currency restriction and it is enabled. */\n currencyRestrictionEnabled?: boolean;\n /**\n * Allowed currencies\n * @maxSize 100\n * @format CURRENCY\n */\n allowedCurrencyCodes?: string[];\n}\n\nexport interface Features {\n /** Express flow configuration. */\n expressFlow?: ExpressFlow;\n /** Regular flow configuration. */\n regularFlow?: RegularFlow;\n /** Disputes configuration. */\n disputes?: Disputes;\n /** Installments configuration. */\n installments?: Installments;\n /** Refunds configuration. */\n refunds?: Refunds;\n /** Authorize and capture configuration. */\n authCapture?: AuthCapture;\n /** Regular tokenization configuration. */\n regularTokenization?: RegularTokenization;\n /** Custom tokenization configuration. */\n customTokenization?: CustomTokenization;\n /** Next action configuration. */\n nextAction?: NextAction;\n /** Credential-on-File (CoF) configuration. */\n credentialOnFile?: CredentialOnFile;\n /** Mail Order/Telephone Order (MOTO) configuration. */\n moto?: Moto;\n /** Promotional message configuration. */\n promotionalMessages?: PromotionalMessages;\n}\n\nexport interface IFrame {\n /** Whether the next payment action can be shown in an iframe. */\n supported?: boolean;\n}\n\nexport interface NewTab {\n /** Whether the next payment action can be shown in a new tab. */\n supported?: boolean;\n}\n\nexport interface FullPageRedirect {\n /** Whether the next payment action can be shown by redirecting to a new page. */\n supported?: boolean;\n}\n\nexport interface Barcode {\n /** Whether the next payment action can be shown as a barcode to scan. */\n supported?: boolean;\n}\n\nexport interface QrCode {\n /** Whether the next payment action can be shown as a QR code to scan. */\n supported?: boolean;\n}\n\nexport interface ExpressFlow {\n /** Whether this payment method type can be used in an express flow on checkout. */\n supported?: boolean;\n}\n\nexport interface RegularFlow {\n /** Whether this payment method type can be used in a regular flow on checkout. */\n supported?: boolean;\n}\n\nexport interface Disputes {\n /** Whether disputes are supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface Installments {\n /** Whether installments are supported for this payment method type. */\n supported?: boolean;\n /**\n * Max number of installments that can be configured by a provider.\n * @min 2\n * @max 36\n */\n maxInstallmentLimit?: number | null;\n /**\n * Countries for which installments can be enabled.\n * @format COUNTRY\n * @minSize 1\n * @maxSize 200\n */\n allowedCountryCodes?: string[];\n}\n\nexport interface Refunds {\n /** Whether refunds are supported for this payment method type. */\n supported?: boolean;\n /**\n * Maximum period in which payments made using this payment method type can be refunded.\n * @min 1\n * @max 365\n */\n maxRefundabilityPeriodInDays?: number | null;\n}\n\nexport interface AuthCapture {\n /** Whether the authorize and capture flow is supported for this payment method type. */\n supported?: boolean;\n /**\n * Period to wait for the auth capture to be completed before canceling the transaction.\n * @min 1\n * @max 365\n */\n maxCapturePeriodInDays?: number | null;\n}\n\nexport interface RegularTokenization {\n /** Whether the default tokenization mechanism can be configured for this payment method type. */\n supported?: boolean;\n}\n\nexport interface CustomTokenization {\n /** Whether a custom tokenization mechanism can be configured for this payment method type, such as a provider-specific tokenization method. */\n supported?: boolean;\n}\n\nexport interface NextAction {\n /** iframe configuration. */\n iframe?: IFrame;\n /** New tab configuration. */\n newTab?: NewTab;\n /** Full page redirect configuration. */\n fullPageRedirect?: FullPageRedirect;\n /** Barcode configuration. */\n barcode?: Barcode;\n /** QR code configuration. */\n qrCode?: QrCode;\n}\n\nexport interface CredentialOnFile {\n /** Whether the Credential-on-File (CoF) feature is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface Moto {\n /** Whether Mail Order/Telephone Order (MOTO) is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface PromotionalMessages {\n /** Whether promotional messages is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface MerchantFlow {\n /**\n * Details about the icons to display for this payment method type on the merchant's Accept Payments page in the site dashboard. Icons are localized according to the locale of the call.\n *\n * Define a locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the method descriptions.\n * @maxSize 200\n */\n icons?: Icon[];\n /**\n * Priority given to this payment method type in the list shown to the merchant.\n * A lower value relative to other payment method types means a higher position on the list.\n * @min 1\n * @max 10000\n */\n priority?: number;\n /** Whether the payment method type is promoted. Promoted payment method types are displayed more prominently on the Accept Payments page. */\n promoted?: boolean;\n /** Whether the merchant cannot choose to accept payments from this payment method type. */\n hidden?: boolean;\n /** Indicates that payment method type is restricted in provided country. */\n countryRestricted?: boolean;\n}\n\n/**\n * Example url:\n * http://images-wixmp-6613fa290e8c1ac70a0297b6.wixmp.com/payment-methods/{domain}/{extension}/{id}.{extension}\n */\nexport interface Icon {\n /** Icon image. */\n image?: string;\n /**\n * Icon tag. Payment method types can have multiple icons, and tags are used to differentiate between them.\n * For example, the UI design for multiple payment method types is upgraded, and now they each have an old icon tagged \"v1\" and a new icon tagged \"v2\". Developers can then easily choose to display all the original \"v1\" style of icons, or all the new \"v2\" style.\n * @minLength 1\n * @maxLength 100\n */\n tag?: string | null;\n /** Icon image format. */\n format?: FormatWithLiterals;\n}\n\nexport enum Format {\n UNKNOWN_FORMAT = 'UNKNOWN_FORMAT',\n SVG = 'SVG',\n PNG = 'PNG',\n}\n\n/** @enumType */\nexport type FormatWithLiterals = Format | 'UNKNOWN_FORMAT' | 'SVG' | 'PNG';\n\nexport interface BuyerFlow {\n /**\n * Details about the icons to display for this payment method type on a site's checkout page. Icons are localized according to the locale of the call.\n *\n * Define a locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the method descriptions.\n * @maxSize 200\n */\n icons?: Icon[];\n /**\n * The priority given to this payment method type in the list of payment method types shown to the buyer.\n * A lower value relative to other payment method types means a higher position on the list.\n * @min 1\n * @max 10000\n */\n priority?: number;\n /** Whether the merchant cannot choose to accept payments from this payment method type. */\n hidden?: boolean;\n /** Indicates that payment method type is restricted in provided country. */\n countryRestricted?: boolean;\n /**\n * Minimum payment amount that can be made with this payment method type.\n * If the request omits `currency_code`, the field is not set because its value depends on the currency.\n * @decimalValue options { maxScale:8, gte:0.00 }\n */\n minPaymentAmount?: string | null;\n}\n\nexport interface GetSitePaymentMethodTypeRequest {\n /**\n * Site payment method type ID.\n * @format GUID\n */\n sitePaymentMethodTypeId: string;\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\nexport enum RequestedFields {\n UNKNOWN_REQUESTED_FIELD = 'UNKNOWN_REQUESTED_FIELD',\n ALLOWED_CURRENCIES = 'ALLOWED_CURRENCIES',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELD'\n | 'ALLOWED_CURRENCIES';\n\nexport interface GetSitePaymentMethodTypeResponse {\n /** Requested site payment method type. */\n sitePaymentMethodType?: SitePaymentMethodType;\n}\n\nexport interface ListSitePaymentMethodTypesRequest {\n /**\n * IDs or legacy IDs of site payment method types to retrieve.\n * @maxSize 250\n * @minLength 1\n * @maxLength 50\n */\n ids?: string[];\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to filter payment method types and determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface ListSitePaymentMethodTypesResponse {\n /** List of site payment method types. */\n sitePaymentMethodTypes?: SitePaymentMethodType[];\n}\n\ntype SitePaymentMethodTypeNonNullablePaths =\n | `_id`\n | `features.expressFlow.supported`\n | `features.regularFlow.supported`\n | `features.disputes.supported`\n | `features.installments.supported`\n | `features.installments.allowedCountryCodes`\n | `features.refunds.supported`\n | `features.authCapture.supported`\n | `features.regularTokenization.supported`\n | `features.customTokenization.supported`\n | `features.nextAction.iframe.supported`\n | `features.nextAction.newTab.supported`\n | `features.nextAction.fullPageRedirect.supported`\n | `features.nextAction.barcode.supported`\n | `features.nextAction.qrCode.supported`\n | `features.credentialOnFile.supported`\n | `features.moto.supported`\n | `features.promotionalMessages.supported`\n | `merchantFlow.icons`\n | `merchantFlow.icons.${number}.format`\n | `merchantFlow.priority`\n | `merchantFlow.promoted`\n | `merchantFlow.hidden`\n | `merchantFlow.countryRestricted`\n | `buyerFlow.icons`\n | `buyerFlow.icons.${number}.format`\n | `buyerFlow.priority`\n | `buyerFlow.hidden`\n | `buyerFlow.countryRestricted`\n | `brandOnly`\n | `inPerson`\n | `currencyRestricted`\n | `currencyRestrictionEnabled`\n | `allowedCurrencyCodes`;\n\n/**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * @param sitePaymentMethodTypeId - Site payment method type ID.\n * @public\n * @documentationMaturity preview\n * @requiredField sitePaymentMethodTypeId\n * @permissionId PAYMENTS.SITE_PAYMENT_METHOD_TYPE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Requested site payment method type.\n * @fqn wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.GetSitePaymentMethodType\n */\nexport async function getSitePaymentMethodType(\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n): Promise<\n NonNullablePaths<SitePaymentMethodType, SitePaymentMethodTypeNonNullablePaths>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n sitePaymentMethodTypeId: sitePaymentMethodTypeId,\n languageCode: options?.languageCode,\n countryCode: options?.countryCode,\n currencyCode: options?.currencyCode,\n requestedFields: options?.requestedFields,\n });\n\n const reqOpts =\n ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType.getSitePaymentMethodType(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'sitePaymentMethodType.merchantFlow.icons.image' },\n { path: 'sitePaymentMethodType.buyerFlow.icons.image' },\n ],\n },\n ])\n )?.sitePaymentMethodType!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n sitePaymentMethodTypeId: '$[0]',\n languageCode: '$[1].languageCode',\n countryCode: '$[1].countryCode',\n currencyCode: '$[1].currencyCode',\n requestedFields: '$[1].requestedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['sitePaymentMethodTypeId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSitePaymentMethodTypeOptions {\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\n/**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n * @public\n * @documentationMaturity preview\n * @permissionId PAYMENTS.SITE_PAYMENT_METHOD_TYPE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.ListSitePaymentMethodTypes\n */\nexport async function listSitePaymentMethodTypes(\n options?: ListSitePaymentMethodTypesOptions\n): Promise<\n NonNullablePaths<\n ListSitePaymentMethodTypesResponse,\n {\n [P in SitePaymentMethodTypeNonNullablePaths]: `sitePaymentMethodTypes.${number}.${P}`;\n }[SitePaymentMethodTypeNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n ids: options?.ids,\n languageCode: options?.languageCode,\n countryCode: options?.countryCode,\n currencyCode: options?.currencyCode,\n requestedFields: options?.requestedFields,\n });\n\n const reqOpts =\n ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType.listSitePaymentMethodTypes(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'sitePaymentMethodTypes.merchantFlow.icons.image' },\n { path: 'sitePaymentMethodTypes.buyerFlow.icons.image' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n ids: '$[0].ids',\n languageCode: '$[0].languageCode',\n countryCode: '$[0].countryCode',\n currencyCode: '$[0].currencyCode',\n requestedFields: '$[0].requestedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListSitePaymentMethodTypesOptions {\n /**\n * IDs or legacy IDs of site payment method types to retrieve.\n * @maxSize 250\n * @minLength 1\n * @maxLength 50\n */\n ids?: string[];\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to filter payment method types and determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/payment-method-types',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/payments/site-payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier-services._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'events._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'events.wixapps.net': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'invoices._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'pricing-plans.wixapps.net': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'vod-server._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'www.wixhotels.com': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'tpa.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath:\n '/payments/site-payment-method-types/v1/site-payment-method-types',\n destPath: '/v1/site-payment-method-types',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath:\n '/payments/site-payment-method-types/v1/site-payment-method-types',\n destPath: '/v1/site-payment-method-types',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_site-payment-method-types';\n\n/**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n */\nexport function getSitePaymentMethodType(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSitePaymentMethodType({ host }: any) {\n const metadata = {\n entityFqdn:\n 'wix.payments.site_payment_method_types.v1.site_payment_method_type',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.GetSitePaymentMethodType',\n packageName: PACKAGE_NAME,\n url: resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n {\n protoPath: '/v1/site-payment-method-types/{sitePaymentMethodTypeId}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getSitePaymentMethodType;\n}\n\n/**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n */\nexport function listSitePaymentMethodTypes(\n payload: object\n): RequestOptionsFactory<any> {\n function __listSitePaymentMethodTypes({ host }: any) {\n const metadata = {\n entityFqdn:\n 'wix.payments.site_payment_method_types.v1.site_payment_method_type',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.ListSitePaymentMethodTypes',\n packageName: PACKAGE_NAME,\n url: resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n { protoPath: '/v1/site-payment-method-types', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSitePaymentMethodTypes;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetSitePaymentMethodTypeOptions,\n ListSitePaymentMethodTypesOptions,\n ListSitePaymentMethodTypesResponse,\n SitePaymentMethodType,\n getSitePaymentMethodType as universalGetSitePaymentMethodType,\n listSitePaymentMethodTypes as universalListSitePaymentMethodTypes,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\ntype SitePaymentMethodTypeNonNullablePaths =\n | `_id`\n | `features.expressFlow.supported`\n | `features.regularFlow.supported`\n | `features.disputes.supported`\n | `features.installments.supported`\n | `features.installments.allowedCountryCodes`\n | `features.refunds.supported`\n | `features.authCapture.supported`\n | `features.regularTokenization.supported`\n | `features.customTokenization.supported`\n | `features.nextAction.iframe.supported`\n | `features.nextAction.newTab.supported`\n | `features.nextAction.fullPageRedirect.supported`\n | `features.nextAction.barcode.supported`\n | `features.nextAction.qrCode.supported`\n | `features.credentialOnFile.supported`\n | `features.moto.supported`\n | `features.promotionalMessages.supported`\n | `merchantFlow.icons`\n | `merchantFlow.icons.${number}.format`\n | `merchantFlow.priority`\n | `merchantFlow.promoted`\n | `merchantFlow.hidden`\n | `merchantFlow.countryRestricted`\n | `buyerFlow.icons`\n | `buyerFlow.icons.${number}.format`\n | `buyerFlow.priority`\n | `buyerFlow.hidden`\n | `buyerFlow.countryRestricted`\n | `brandOnly`\n | `inPerson`\n | `currencyRestricted`\n | `currencyRestrictionEnabled`\n | `allowedCurrencyCodes`;\n\nexport function getSitePaymentMethodType(\n httpClient: HttpClient\n): GetSitePaymentMethodTypeSignature {\n return (\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n ) =>\n universalGetSitePaymentMethodType(\n sitePaymentMethodTypeId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetSitePaymentMethodTypeSignature {\n /**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * @param - Site payment method type ID.\n * @returns Requested site payment method type.\n */\n (\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n ): Promise<\n NonNullablePaths<\n SitePaymentMethodType,\n SitePaymentMethodTypeNonNullablePaths\n >\n >;\n}\n\nexport function listSitePaymentMethodTypes(\n httpClient: HttpClient\n): ListSitePaymentMethodTypesSignature {\n return (options?: ListSitePaymentMethodTypesOptions) =>\n universalListSitePaymentMethodTypes(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListSitePaymentMethodTypesSignature {\n /**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n */\n (options?: ListSitePaymentMethodTypesOptions): Promise<\n NonNullablePaths<\n ListSitePaymentMethodTypesResponse,\n {\n [P in SitePaymentMethodTypeNonNullablePaths]: `sitePaymentMethodTypes.${number}.${P}`;\n }[SitePaymentMethodTypeNonNullablePaths]\n >\n >;\n}\n\nexport {\n AuthCapture,\n Barcode,\n BuyerFlow,\n CredentialOnFile,\n CustomTokenization,\n Disputes,\n ExpressFlow,\n Features,\n Format,\n FullPageRedirect,\n GetSitePaymentMethodTypeOptions,\n GetSitePaymentMethodTypeRequest,\n GetSitePaymentMethodTypeResponse,\n IFrame,\n Icon,\n Installments,\n ListSitePaymentMethodTypesOptions,\n ListSitePaymentMethodTypesRequest,\n ListSitePaymentMethodTypesResponse,\n MerchantFlow,\n Moto,\n NewTab,\n NextAction,\n PromotionalMessages,\n QrCode,\n Refunds,\n RegularFlow,\n RegularTokenization,\n RequestedFields,\n SitePaymentMethodType,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n","import {\n getSitePaymentMethodType as publicGetSitePaymentMethodType,\n listSitePaymentMethodTypes as publicListSitePaymentMethodTypes,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getSitePaymentMethodType: MaybeContext<\n BuildRESTFunction<typeof publicGetSitePaymentMethodType> &\n typeof publicGetSitePaymentMethodType\n> = /*#__PURE__*/ createRESTModule(publicGetSitePaymentMethodType);\nexport const listSitePaymentMethodTypes: MaybeContext<\n BuildRESTFunction<typeof publicListSitePaymentMethodTypes> &\n typeof publicListSitePaymentMethodTypes\n> = /*#__PURE__*/ createRESTModule(publicListSitePaymentMethodTypes);\n\nexport {\n Format,\n RequestedFields,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\nexport {\n SitePaymentMethodType,\n Features,\n IFrame,\n NewTab,\n FullPageRedirect,\n Barcode,\n QrCode,\n ExpressFlow,\n RegularFlow,\n Disputes,\n Installments,\n Refunds,\n AuthCapture,\n RegularTokenization,\n CustomTokenization,\n NextAction,\n CredentialOnFile,\n Moto,\n PromotionalMessages,\n MerchantFlow,\n Icon,\n BuyerFlow,\n GetSitePaymentMethodTypeRequest,\n GetSitePaymentMethodTypeResponse,\n ListSitePaymentMethodTypesRequest,\n ListSitePaymentMethodTypesResponse,\n GetSitePaymentMethodTypeOptions,\n ListSitePaymentMethodTypesOptions,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,0EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kCAAkC;AAAA,MAChC;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA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iBAAa,YAAY,MAAM;AAE/B,WAAO;AAAA,MACL,eAAe,OAAO,MAAM;AAAA,QAC1B;AAAA,UACE,aAAa;AAAA,UACb,OAAO;AAAA,YACL,EAAE,MAAM,kDAAkD;AAAA,YAC1D,EAAE,MAAM,+CAA+C;AAAA,UACzD;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,KAAK;AAAA,UACL,cAAc;AAAA,UACd,aAAa;AAAA,UACb,cAAc;AAAA,UACd,iBAAiB;AAAA,QACnB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEtkBO,SAASC,0BACd,YACmC;AACnC,SAAO,CACL,yBACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA0BO,SAASC,4BACd,YACqC;AACrC,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC5FA,SAAS,wBAAwB;AAG1B,IAAMC,4BAGK,iCAAiBA,yBAA8B;AAC1D,IAAMC,8BAGK,iCAAiBA,2BAAgC;","names":["Format","RequestedFields","getSitePaymentMethodType","listSitePaymentMethodTypes","getSitePaymentMethodType","listSitePaymentMethodTypes","getSitePaymentMethodType","listSitePaymentMethodTypes"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
1
|
+
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
2
|
import { GetSitePaymentMethodTypeOptions, SitePaymentMethodType, ListSitePaymentMethodTypesOptions, ListSitePaymentMethodTypesResponse } from './index.typings.js';
|
|
3
3
|
export { AuthCapture, Barcode, BuyerFlow, CredentialOnFile, CustomTokenization, Disputes, ExpressFlow, Features, Format, FullPageRedirect, GetSitePaymentMethodTypeRequest, GetSitePaymentMethodTypeResponse, IFrame, Icon, Installments, ListSitePaymentMethodTypesRequest, MerchantFlow, Moto, NewTab, NextAction, PromotionalMessages, QrCode, Refunds, RegularFlow, RegularTokenization, RequestedFields } from './index.typings.js';
|
|
4
4
|
|
|
5
|
+
type SitePaymentMethodTypeNonNullablePaths = `_id` | `features.expressFlow.supported` | `features.regularFlow.supported` | `features.disputes.supported` | `features.installments.supported` | `features.installments.allowedCountryCodes` | `features.refunds.supported` | `features.authCapture.supported` | `features.regularTokenization.supported` | `features.customTokenization.supported` | `features.nextAction.iframe.supported` | `features.nextAction.newTab.supported` | `features.nextAction.fullPageRedirect.supported` | `features.nextAction.barcode.supported` | `features.nextAction.qrCode.supported` | `features.credentialOnFile.supported` | `features.moto.supported` | `features.promotionalMessages.supported` | `merchantFlow.icons` | `merchantFlow.icons.${number}.format` | `merchantFlow.priority` | `merchantFlow.promoted` | `merchantFlow.hidden` | `merchantFlow.countryRestricted` | `buyerFlow.icons` | `buyerFlow.icons.${number}.format` | `buyerFlow.priority` | `buyerFlow.hidden` | `buyerFlow.countryRestricted` | `brandOnly` | `inPerson` | `currencyRestricted` | `currencyRestrictionEnabled` | `allowedCurrencyCodes`;
|
|
5
6
|
declare function getSitePaymentMethodType$1(httpClient: HttpClient): GetSitePaymentMethodTypeSignature;
|
|
6
7
|
interface GetSitePaymentMethodTypeSignature {
|
|
7
8
|
/**
|
|
@@ -16,7 +17,7 @@ interface GetSitePaymentMethodTypeSignature {
|
|
|
16
17
|
* @param - Site payment method type ID.
|
|
17
18
|
* @returns Requested site payment method type.
|
|
18
19
|
*/
|
|
19
|
-
(sitePaymentMethodTypeId: string, options?: GetSitePaymentMethodTypeOptions
|
|
20
|
+
(sitePaymentMethodTypeId: string, options?: GetSitePaymentMethodTypeOptions): Promise<NonNullablePaths<SitePaymentMethodType, SitePaymentMethodTypeNonNullablePaths>>;
|
|
20
21
|
}
|
|
21
22
|
declare function listSitePaymentMethodTypes$1(httpClient: HttpClient): ListSitePaymentMethodTypesSignature;
|
|
22
23
|
interface ListSitePaymentMethodTypesSignature {
|
|
@@ -34,7 +35,9 @@ interface ListSitePaymentMethodTypesSignature {
|
|
|
34
35
|
* Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.
|
|
35
36
|
* `currency` is used to determine the eligibility of payment method types for the provided currency.
|
|
36
37
|
*/
|
|
37
|
-
(options?: ListSitePaymentMethodTypesOptions
|
|
38
|
+
(options?: ListSitePaymentMethodTypesOptions): Promise<NonNullablePaths<ListSitePaymentMethodTypesResponse, {
|
|
39
|
+
[P in SitePaymentMethodTypeNonNullablePaths]: `sitePaymentMethodTypes.${number}.${P}`;
|
|
40
|
+
}[SitePaymentMethodTypeNonNullablePaths]>>;
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
declare const getSitePaymentMethodType: MaybeContext<BuildRESTFunction<typeof getSitePaymentMethodType$1> & typeof getSitePaymentMethodType$1>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../index.ts","../../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.ts","../../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.http.ts","../../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.public.ts","../../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.context.ts"],"sourcesContent":["export * from './src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.http.js';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** A way to pay online or offline for goods or services offered by a specific site. */\nexport interface SitePaymentMethodType {\n /**\n * Payment method type ID.\n * @format GUID\n * @immutable\n */\n _id?: string;\n /**\n * Value used buy some legacy APIs to refer to this payment method type. Can be empty.\n * @minLength 1\n * @maxLength 50\n * @immutable\n */\n legacyId?: string | null;\n /**\n * Payment method type display name, based on locale.\n *\n * Used by Wix when displaying the payment method type, such as in the payment settings page for merchants, or the checkout page for buyers.\n *\n * Define your locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the descriptions for the `country_code` and `language_code` parameters for those methods.\n * @minLength 1\n * @maxLength 100\n */\n displayName?: string | null;\n /**\n * Payment method type description, based on locale.\n *\n * Used by Wix when displaying the payment method type, such as in the payment settings page for merchants, or the checkout page for buyers.\n *\n * Define your locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the descriptions for the `country_code` and `language_code` parameters for those methods.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n /** Features supported for this payment method type. */\n features?: Features;\n /** Settings that determine if and how to display this payment method type in the merchant flow. The merchant flow is the process a merchant goes through to configure which payment method types they accept on their site. */\n merchantFlow?: MerchantFlow;\n /** Settings that determine if and how to display this payment method type in the buyer flow. The buyer flow is the process a buyer goes through to make a purchase att checkout. */\n buyerFlow?: BuyerFlow;\n /**\n * Whether this payment method type is only used to represent a supported payment brand for another payment method type.\n *\n * For example, a Visa payment method is used to indicate that Visa can be used for credit card transactions. But the Visa payment method type is not used to accept payments. Instead, the credit card payment method type is used.\n *\n * Brand-only payment method types cannot be used to accept payments, and are not listed as a payment method type in a site's dashboard.\n */\n brandOnly?: boolean;\n /** Whether the payment method type can only be used for in-person payments, such as cash, point-of-sale payments, and card readers. */\n inPerson?: boolean;\n /**\n * Time (in seconds after which a transaction is marked as expired if it is not completed.\n *\n * Max: `15552000` (180 days)\n * @min 1\n * @max 15552000\n */\n transactionExpirationDelayInSeconds?: number | null;\n /** Indicates that payment method type is restricted for the provided `currency_code`. */\n currencyRestricted?: boolean;\n /** Indicates the payment method type has currency restriction and it is enabled. */\n currencyRestrictionEnabled?: boolean;\n /**\n * Allowed currencies\n * @maxSize 100\n * @format CURRENCY\n */\n allowedCurrencyCodes?: string[];\n}\n\nexport interface Features {\n /** Express flow configuration. */\n expressFlow?: ExpressFlow;\n /** Regular flow configuration. */\n regularFlow?: RegularFlow;\n /** Disputes configuration. */\n disputes?: Disputes;\n /** Installments configuration. */\n installments?: Installments;\n /** Refunds configuration. */\n refunds?: Refunds;\n /** Authorize and capture configuration. */\n authCapture?: AuthCapture;\n /** Regular tokenization configuration. */\n regularTokenization?: RegularTokenization;\n /** Custom tokenization configuration. */\n customTokenization?: CustomTokenization;\n /** Next action configuration. */\n nextAction?: NextAction;\n /** Credential-on-File (CoF) configuration. */\n credentialOnFile?: CredentialOnFile;\n /** Mail Order/Telephone Order (MOTO) configuration. */\n moto?: Moto;\n /** Promotional message configuration. */\n promotionalMessages?: PromotionalMessages;\n}\n\nexport interface IFrame {\n /** Whether the next payment action can be shown in an iframe. */\n supported?: boolean;\n}\n\nexport interface NewTab {\n /** Whether the next payment action can be shown in a new tab. */\n supported?: boolean;\n}\n\nexport interface FullPageRedirect {\n /** Whether the next payment action can be shown by redirecting to a new page. */\n supported?: boolean;\n}\n\nexport interface Barcode {\n /** Whether the next payment action can be shown as a barcode to scan. */\n supported?: boolean;\n}\n\nexport interface QrCode {\n /** Whether the next payment action can be shown as a QR code to scan. */\n supported?: boolean;\n}\n\nexport interface ExpressFlow {\n /** Whether this payment method type can be used in an express flow on checkout. */\n supported?: boolean;\n}\n\nexport interface RegularFlow {\n /** Whether this payment method type can be used in a regular flow on checkout. */\n supported?: boolean;\n}\n\nexport interface Disputes {\n /** Whether disputes are supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface Installments {\n /** Whether installments are supported for this payment method type. */\n supported?: boolean;\n /**\n * Max number of installments that can be configured by a provider.\n * @min 2\n * @max 36\n */\n maxInstallmentLimit?: number | null;\n /**\n * Countries for which installments can be enabled.\n * @format COUNTRY\n * @minSize 1\n * @maxSize 200\n */\n allowedCountryCodes?: string[];\n}\n\nexport interface Refunds {\n /** Whether refunds are supported for this payment method type. */\n supported?: boolean;\n /**\n * Maximum period in which payments made using this payment method type can be refunded.\n * @min 1\n * @max 365\n */\n maxRefundabilityPeriodInDays?: number | null;\n}\n\nexport interface AuthCapture {\n /** Whether the authorize and capture flow is supported for this payment method type. */\n supported?: boolean;\n /**\n * Period to wait for the auth capture to be completed before canceling the transaction.\n * @min 1\n * @max 365\n */\n maxCapturePeriodInDays?: number | null;\n}\n\nexport interface RegularTokenization {\n /** Whether the default tokenization mechanism can be configured for this payment method type. */\n supported?: boolean;\n}\n\nexport interface CustomTokenization {\n /** Whether a custom tokenization mechanism can be configured for this payment method type, such as a provider-specific tokenization method. */\n supported?: boolean;\n}\n\nexport interface NextAction {\n /** iframe configuration. */\n iframe?: IFrame;\n /** New tab configuration. */\n newTab?: NewTab;\n /** Full page redirect configuration. */\n fullPageRedirect?: FullPageRedirect;\n /** Barcode configuration. */\n barcode?: Barcode;\n /** QR code configuration. */\n qrCode?: QrCode;\n}\n\nexport interface CredentialOnFile {\n /** Whether the Credential-on-File (CoF) feature is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface Moto {\n /** Whether Mail Order/Telephone Order (MOTO) is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface PromotionalMessages {\n /** Whether promotional messages is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface MerchantFlow {\n /**\n * Details about the icons to display for this payment method type on the merchant's Accept Payments page in the site dashboard. Icons are localized according to the locale of the call.\n *\n * Define a locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the method descriptions.\n * @maxSize 200\n */\n icons?: Icon[];\n /**\n * Priority given to this payment method type in the list shown to the merchant.\n * A lower value relative to other payment method types means a higher position on the list.\n * @min 1\n * @max 10000\n */\n priority?: number;\n /** Whether the payment method type is promoted. Promoted payment method types are displayed more prominently on the Accept Payments page. */\n promoted?: boolean;\n /** Whether the merchant cannot choose to accept payments from this payment method type. */\n hidden?: boolean;\n /** Indicates that payment method type is restricted in provided country. */\n countryRestricted?: boolean;\n}\n\n/**\n * Example url:\n * http://images-wixmp-6613fa290e8c1ac70a0297b6.wixmp.com/payment-methods/{domain}/{extension}/{id}.{extension}\n */\nexport interface Icon {\n /** Icon image. */\n image?: string;\n /**\n * Icon tag. Payment method types can have multiple icons, and tags are used to differentiate between them.\n * For example, the UI design for multiple payment method types is upgraded, and now they each have an old icon tagged \"v1\" and a new icon tagged \"v2\". Developers can then easily choose to display all the original \"v1\" style of icons, or all the new \"v2\" style.\n * @minLength 1\n * @maxLength 100\n */\n tag?: string | null;\n /** Icon image format. */\n format?: FormatWithLiterals;\n}\n\nexport enum Format {\n UNKNOWN_FORMAT = 'UNKNOWN_FORMAT',\n SVG = 'SVG',\n PNG = 'PNG',\n}\n\n/** @enumType */\nexport type FormatWithLiterals = Format | 'UNKNOWN_FORMAT' | 'SVG' | 'PNG';\n\nexport interface BuyerFlow {\n /**\n * Details about the icons to display for this payment method type on a site's checkout page. Icons are localized according to the locale of the call.\n *\n * Define a locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the method descriptions.\n * @maxSize 200\n */\n icons?: Icon[];\n /**\n * The priority given to this payment method type in the list of payment method types shown to the buyer.\n * A lower value relative to other payment method types means a higher position on the list.\n * @min 1\n * @max 10000\n */\n priority?: number;\n /** Whether the merchant cannot choose to accept payments from this payment method type. */\n hidden?: boolean;\n /** Indicates that payment method type is restricted in provided country. */\n countryRestricted?: boolean;\n /**\n * Minimum payment amount that can be made with this payment method type.\n * If the request omits `currency_code`, the field is not set because its value depends on the currency.\n * @decimalValue options { maxScale:8, gte:0.00 }\n */\n minPaymentAmount?: string | null;\n}\n\nexport interface GetSitePaymentMethodTypeRequest {\n /**\n * Site payment method type ID.\n * @format GUID\n */\n sitePaymentMethodTypeId: string;\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\nexport enum RequestedFields {\n UNKNOWN_REQUESTED_FIELD = 'UNKNOWN_REQUESTED_FIELD',\n ALLOWED_CURRENCIES = 'ALLOWED_CURRENCIES',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELD'\n | 'ALLOWED_CURRENCIES';\n\nexport interface GetSitePaymentMethodTypeResponse {\n /** Requested site payment method type. */\n sitePaymentMethodType?: SitePaymentMethodType;\n}\n\nexport interface ListSitePaymentMethodTypesRequest {\n /**\n * IDs or legacy IDs of site payment method types to retrieve.\n * @maxSize 250\n * @minLength 1\n * @maxLength 50\n */\n ids?: string[];\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to filter payment method types and determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface ListSitePaymentMethodTypesResponse {\n /** List of site payment method types. */\n sitePaymentMethodTypes?: SitePaymentMethodType[];\n}\n\ntype SitePaymentMethodTypeNonNullablePaths =\n | `_id`\n | `features.expressFlow.supported`\n | `features.regularFlow.supported`\n | `features.disputes.supported`\n | `features.installments.supported`\n | `features.installments.allowedCountryCodes`\n | `features.refunds.supported`\n | `features.authCapture.supported`\n | `features.regularTokenization.supported`\n | `features.customTokenization.supported`\n | `features.nextAction.iframe.supported`\n | `features.nextAction.newTab.supported`\n | `features.nextAction.fullPageRedirect.supported`\n | `features.nextAction.barcode.supported`\n | `features.nextAction.qrCode.supported`\n | `features.credentialOnFile.supported`\n | `features.moto.supported`\n | `features.promotionalMessages.supported`\n | `merchantFlow.icons`\n | `merchantFlow.icons.${number}.format`\n | `merchantFlow.priority`\n | `merchantFlow.promoted`\n | `merchantFlow.hidden`\n | `merchantFlow.countryRestricted`\n | `buyerFlow.icons`\n | `buyerFlow.icons.${number}.format`\n | `buyerFlow.priority`\n | `buyerFlow.hidden`\n | `buyerFlow.countryRestricted`\n | `brandOnly`\n | `inPerson`\n | `currencyRestricted`\n | `currencyRestrictionEnabled`\n | `allowedCurrencyCodes`;\n\n/**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * @param sitePaymentMethodTypeId - Site payment method type ID.\n * @public\n * @documentationMaturity preview\n * @requiredField sitePaymentMethodTypeId\n * @permissionId PAYMENTS.SITE_PAYMENT_METHOD_TYPE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Requested site payment method type.\n * @fqn wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.GetSitePaymentMethodType\n */\nexport async function getSitePaymentMethodType(\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n): Promise<\n NonNullablePaths<SitePaymentMethodType, SitePaymentMethodTypeNonNullablePaths>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n sitePaymentMethodTypeId: sitePaymentMethodTypeId,\n languageCode: options?.languageCode,\n countryCode: options?.countryCode,\n currencyCode: options?.currencyCode,\n requestedFields: options?.requestedFields,\n });\n\n const reqOpts =\n ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType.getSitePaymentMethodType(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'sitePaymentMethodType.merchantFlow.icons.image' },\n { path: 'sitePaymentMethodType.buyerFlow.icons.image' },\n ],\n },\n ])\n )?.sitePaymentMethodType!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n sitePaymentMethodTypeId: '$[0]',\n languageCode: '$[1].languageCode',\n countryCode: '$[1].countryCode',\n currencyCode: '$[1].currencyCode',\n requestedFields: '$[1].requestedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['sitePaymentMethodTypeId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSitePaymentMethodTypeOptions {\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\n/**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n * @public\n * @documentationMaturity preview\n * @permissionId PAYMENTS.SITE_PAYMENT_METHOD_TYPE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.ListSitePaymentMethodTypes\n */\nexport async function listSitePaymentMethodTypes(\n options?: ListSitePaymentMethodTypesOptions\n): Promise<\n NonNullablePaths<\n ListSitePaymentMethodTypesResponse,\n {\n [P in SitePaymentMethodTypeNonNullablePaths]: `sitePaymentMethodTypes.${number}.${P}`;\n }[SitePaymentMethodTypeNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n ids: options?.ids,\n languageCode: options?.languageCode,\n countryCode: options?.countryCode,\n currencyCode: options?.currencyCode,\n requestedFields: options?.requestedFields,\n });\n\n const reqOpts =\n ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType.listSitePaymentMethodTypes(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'sitePaymentMethodTypes.merchantFlow.icons.image' },\n { path: 'sitePaymentMethodTypes.buyerFlow.icons.image' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n ids: '$[0].ids',\n languageCode: '$[0].languageCode',\n countryCode: '$[0].countryCode',\n currencyCode: '$[0].currencyCode',\n requestedFields: '$[0].requestedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListSitePaymentMethodTypesOptions {\n /**\n * IDs or legacy IDs of site payment method types to retrieve.\n * @maxSize 250\n * @minLength 1\n * @maxLength 50\n */\n ids?: string[];\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to filter payment method types and determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/payment-method-types',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/payments/site-payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier-services._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'events._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'events.wixapps.net': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'invoices._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'pricing-plans.wixapps.net': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'vod-server._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'www.wixhotels.com': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'tpa.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath:\n '/payments/site-payment-method-types/v1/site-payment-method-types',\n destPath: '/v1/site-payment-method-types',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath:\n '/payments/site-payment-method-types/v1/site-payment-method-types',\n destPath: '/v1/site-payment-method-types',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_site-payment-method-types';\n\n/**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n */\nexport function getSitePaymentMethodType(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSitePaymentMethodType({ host }: any) {\n const metadata = {\n entityFqdn:\n 'wix.payments.site_payment_method_types.v1.site_payment_method_type',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.GetSitePaymentMethodType',\n packageName: PACKAGE_NAME,\n url: resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n {\n protoPath: '/v1/site-payment-method-types/{sitePaymentMethodTypeId}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getSitePaymentMethodType;\n}\n\n/**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n */\nexport function listSitePaymentMethodTypes(\n payload: object\n): RequestOptionsFactory<any> {\n function __listSitePaymentMethodTypes({ host }: any) {\n const metadata = {\n entityFqdn:\n 'wix.payments.site_payment_method_types.v1.site_payment_method_type',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.ListSitePaymentMethodTypes',\n packageName: PACKAGE_NAME,\n url: resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n { protoPath: '/v1/site-payment-method-types', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSitePaymentMethodTypes;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n GetSitePaymentMethodTypeOptions,\n ListSitePaymentMethodTypesOptions,\n ListSitePaymentMethodTypesResponse,\n SitePaymentMethodType,\n getSitePaymentMethodType as universalGetSitePaymentMethodType,\n listSitePaymentMethodTypes as universalListSitePaymentMethodTypes,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\nexport function getSitePaymentMethodType(\n httpClient: HttpClient\n): GetSitePaymentMethodTypeSignature {\n return (\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n ) =>\n universalGetSitePaymentMethodType(\n sitePaymentMethodTypeId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetSitePaymentMethodTypeSignature {\n /**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * @param - Site payment method type ID.\n * @returns Requested site payment method type.\n */\n (\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions | undefined\n ): Promise<SitePaymentMethodType>;\n}\n\nexport function listSitePaymentMethodTypes(\n httpClient: HttpClient\n): ListSitePaymentMethodTypesSignature {\n return (options?: ListSitePaymentMethodTypesOptions) =>\n universalListSitePaymentMethodTypes(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListSitePaymentMethodTypesSignature {\n /**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n */\n (\n options?: ListSitePaymentMethodTypesOptions | undefined\n ): Promise<ListSitePaymentMethodTypesResponse>;\n}\n\nexport {\n AuthCapture,\n Barcode,\n BuyerFlow,\n CredentialOnFile,\n CustomTokenization,\n Disputes,\n ExpressFlow,\n Features,\n Format,\n FullPageRedirect,\n GetSitePaymentMethodTypeOptions,\n GetSitePaymentMethodTypeRequest,\n GetSitePaymentMethodTypeResponse,\n IFrame,\n Icon,\n Installments,\n ListSitePaymentMethodTypesOptions,\n ListSitePaymentMethodTypesRequest,\n ListSitePaymentMethodTypesResponse,\n MerchantFlow,\n Moto,\n NewTab,\n NextAction,\n PromotionalMessages,\n QrCode,\n Refunds,\n RegularFlow,\n RegularTokenization,\n RequestedFields,\n SitePaymentMethodType,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n","import {\n getSitePaymentMethodType as publicGetSitePaymentMethodType,\n listSitePaymentMethodTypes as publicListSitePaymentMethodTypes,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getSitePaymentMethodType: MaybeContext<\n BuildRESTFunction<typeof publicGetSitePaymentMethodType> &\n typeof publicGetSitePaymentMethodType\n> = /*#__PURE__*/ createRESTModule(publicGetSitePaymentMethodType);\nexport const listSitePaymentMethodTypes: MaybeContext<\n BuildRESTFunction<typeof publicListSitePaymentMethodTypes> &\n typeof publicListSitePaymentMethodTypes\n> = /*#__PURE__*/ createRESTModule(publicListSitePaymentMethodTypes);\n\nexport {\n Format,\n RequestedFields,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\nexport {\n SitePaymentMethodType,\n Features,\n IFrame,\n NewTab,\n FullPageRedirect,\n Barcode,\n QrCode,\n ExpressFlow,\n RegularFlow,\n Disputes,\n Installments,\n Refunds,\n AuthCapture,\n RegularTokenization,\n CustomTokenization,\n NextAction,\n CredentialOnFile,\n Moto,\n PromotionalMessages,\n MerchantFlow,\n Icon,\n BuyerFlow,\n GetSitePaymentMethodTypeRequest,\n GetSitePaymentMethodTypeResponse,\n ListSitePaymentMethodTypesRequest,\n ListSitePaymentMethodTypesResponse,\n GetSitePaymentMethodTypeOptions,\n ListSitePaymentMethodTypesOptions,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,kCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,0EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AA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,UACL,cAAc;AAAA,UACd,aAAa;AAAA,UACb,cAAc;AAAA,UACd,iBAAiB;AAAA,QACnB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE1mBO,SAASE,0BACd,YACmC;AACnC,SAAO,CACL,yBACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAqBO,SAASC,4BACd,YACqC;AACrC,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACnDA,IAAAC,uBAAiC;AAG1B,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,8BAGK,2DAAiBA,2BAAgC;","names":["getSitePaymentMethodType","listSitePaymentMethodTypes","import_rest_modules","Format","RequestedFields","getSitePaymentMethodType","sdkTransformError","listSitePaymentMethodTypes","getSitePaymentMethodType","listSitePaymentMethodTypes","import_rest_modules","getSitePaymentMethodType","listSitePaymentMethodTypes"]}
|
|
1
|
+
{"version":3,"sources":["../../../index.ts","../../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.ts","../../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.http.ts","../../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.public.ts","../../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.context.ts"],"sourcesContent":["export * from './src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.http.js';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** A way to pay online or offline for goods or services offered by a specific site. */\nexport interface SitePaymentMethodType {\n /**\n * Payment method type ID.\n * @format GUID\n * @immutable\n */\n _id?: string;\n /**\n * Value used buy some legacy APIs to refer to this payment method type. Can be empty.\n * @minLength 1\n * @maxLength 50\n * @immutable\n */\n legacyId?: string | null;\n /**\n * Payment method type display name, based on locale.\n *\n * Used by Wix when displaying the payment method type, such as in the payment settings page for merchants, or the checkout page for buyers.\n *\n * Define your locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the descriptions for the `country_code` and `language_code` parameters for those methods.\n * @minLength 1\n * @maxLength 100\n */\n displayName?: string | null;\n /**\n * Payment method type description, based on locale.\n *\n * Used by Wix when displaying the payment method type, such as in the payment settings page for merchants, or the checkout page for buyers.\n *\n * Define your locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the descriptions for the `country_code` and `language_code` parameters for those methods.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n /** Features supported for this payment method type. */\n features?: Features;\n /** Settings that determine if and how to display this payment method type in the merchant flow. The merchant flow is the process a merchant goes through to configure which payment method types they accept on their site. */\n merchantFlow?: MerchantFlow;\n /** Settings that determine if and how to display this payment method type in the buyer flow. The buyer flow is the process a buyer goes through to make a purchase att checkout. */\n buyerFlow?: BuyerFlow;\n /**\n * Whether this payment method type is only used to represent a supported payment brand for another payment method type.\n *\n * For example, a Visa payment method is used to indicate that Visa can be used for credit card transactions. But the Visa payment method type is not used to accept payments. Instead, the credit card payment method type is used.\n *\n * Brand-only payment method types cannot be used to accept payments, and are not listed as a payment method type in a site's dashboard.\n */\n brandOnly?: boolean;\n /** Whether the payment method type can only be used for in-person payments, such as cash, point-of-sale payments, and card readers. */\n inPerson?: boolean;\n /**\n * Time (in seconds after which a transaction is marked as expired if it is not completed.\n *\n * Max: `15552000` (180 days)\n * @min 1\n * @max 15552000\n */\n transactionExpirationDelayInSeconds?: number | null;\n /** Indicates that payment method type is restricted for the provided `currency_code`. */\n currencyRestricted?: boolean;\n /** Indicates the payment method type has currency restriction and it is enabled. */\n currencyRestrictionEnabled?: boolean;\n /**\n * Allowed currencies\n * @maxSize 100\n * @format CURRENCY\n */\n allowedCurrencyCodes?: string[];\n}\n\nexport interface Features {\n /** Express flow configuration. */\n expressFlow?: ExpressFlow;\n /** Regular flow configuration. */\n regularFlow?: RegularFlow;\n /** Disputes configuration. */\n disputes?: Disputes;\n /** Installments configuration. */\n installments?: Installments;\n /** Refunds configuration. */\n refunds?: Refunds;\n /** Authorize and capture configuration. */\n authCapture?: AuthCapture;\n /** Regular tokenization configuration. */\n regularTokenization?: RegularTokenization;\n /** Custom tokenization configuration. */\n customTokenization?: CustomTokenization;\n /** Next action configuration. */\n nextAction?: NextAction;\n /** Credential-on-File (CoF) configuration. */\n credentialOnFile?: CredentialOnFile;\n /** Mail Order/Telephone Order (MOTO) configuration. */\n moto?: Moto;\n /** Promotional message configuration. */\n promotionalMessages?: PromotionalMessages;\n}\n\nexport interface IFrame {\n /** Whether the next payment action can be shown in an iframe. */\n supported?: boolean;\n}\n\nexport interface NewTab {\n /** Whether the next payment action can be shown in a new tab. */\n supported?: boolean;\n}\n\nexport interface FullPageRedirect {\n /** Whether the next payment action can be shown by redirecting to a new page. */\n supported?: boolean;\n}\n\nexport interface Barcode {\n /** Whether the next payment action can be shown as a barcode to scan. */\n supported?: boolean;\n}\n\nexport interface QrCode {\n /** Whether the next payment action can be shown as a QR code to scan. */\n supported?: boolean;\n}\n\nexport interface ExpressFlow {\n /** Whether this payment method type can be used in an express flow on checkout. */\n supported?: boolean;\n}\n\nexport interface RegularFlow {\n /** Whether this payment method type can be used in a regular flow on checkout. */\n supported?: boolean;\n}\n\nexport interface Disputes {\n /** Whether disputes are supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface Installments {\n /** Whether installments are supported for this payment method type. */\n supported?: boolean;\n /**\n * Max number of installments that can be configured by a provider.\n * @min 2\n * @max 36\n */\n maxInstallmentLimit?: number | null;\n /**\n * Countries for which installments can be enabled.\n * @format COUNTRY\n * @minSize 1\n * @maxSize 200\n */\n allowedCountryCodes?: string[];\n}\n\nexport interface Refunds {\n /** Whether refunds are supported for this payment method type. */\n supported?: boolean;\n /**\n * Maximum period in which payments made using this payment method type can be refunded.\n * @min 1\n * @max 365\n */\n maxRefundabilityPeriodInDays?: number | null;\n}\n\nexport interface AuthCapture {\n /** Whether the authorize and capture flow is supported for this payment method type. */\n supported?: boolean;\n /**\n * Period to wait for the auth capture to be completed before canceling the transaction.\n * @min 1\n * @max 365\n */\n maxCapturePeriodInDays?: number | null;\n}\n\nexport interface RegularTokenization {\n /** Whether the default tokenization mechanism can be configured for this payment method type. */\n supported?: boolean;\n}\n\nexport interface CustomTokenization {\n /** Whether a custom tokenization mechanism can be configured for this payment method type, such as a provider-specific tokenization method. */\n supported?: boolean;\n}\n\nexport interface NextAction {\n /** iframe configuration. */\n iframe?: IFrame;\n /** New tab configuration. */\n newTab?: NewTab;\n /** Full page redirect configuration. */\n fullPageRedirect?: FullPageRedirect;\n /** Barcode configuration. */\n barcode?: Barcode;\n /** QR code configuration. */\n qrCode?: QrCode;\n}\n\nexport interface CredentialOnFile {\n /** Whether the Credential-on-File (CoF) feature is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface Moto {\n /** Whether Mail Order/Telephone Order (MOTO) is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface PromotionalMessages {\n /** Whether promotional messages is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface MerchantFlow {\n /**\n * Details about the icons to display for this payment method type on the merchant's Accept Payments page in the site dashboard. Icons are localized according to the locale of the call.\n *\n * Define a locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the method descriptions.\n * @maxSize 200\n */\n icons?: Icon[];\n /**\n * Priority given to this payment method type in the list shown to the merchant.\n * A lower value relative to other payment method types means a higher position on the list.\n * @min 1\n * @max 10000\n */\n priority?: number;\n /** Whether the payment method type is promoted. Promoted payment method types are displayed more prominently on the Accept Payments page. */\n promoted?: boolean;\n /** Whether the merchant cannot choose to accept payments from this payment method type. */\n hidden?: boolean;\n /** Indicates that payment method type is restricted in provided country. */\n countryRestricted?: boolean;\n}\n\n/**\n * Example url:\n * http://images-wixmp-6613fa290e8c1ac70a0297b6.wixmp.com/payment-methods/{domain}/{extension}/{id}.{extension}\n */\nexport interface Icon {\n /** Icon image. */\n image?: string;\n /**\n * Icon tag. Payment method types can have multiple icons, and tags are used to differentiate between them.\n * For example, the UI design for multiple payment method types is upgraded, and now they each have an old icon tagged \"v1\" and a new icon tagged \"v2\". Developers can then easily choose to display all the original \"v1\" style of icons, or all the new \"v2\" style.\n * @minLength 1\n * @maxLength 100\n */\n tag?: string | null;\n /** Icon image format. */\n format?: FormatWithLiterals;\n}\n\nexport enum Format {\n UNKNOWN_FORMAT = 'UNKNOWN_FORMAT',\n SVG = 'SVG',\n PNG = 'PNG',\n}\n\n/** @enumType */\nexport type FormatWithLiterals = Format | 'UNKNOWN_FORMAT' | 'SVG' | 'PNG';\n\nexport interface BuyerFlow {\n /**\n * Details about the icons to display for this payment method type on a site's checkout page. Icons are localized according to the locale of the call.\n *\n * Define a locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the method descriptions.\n * @maxSize 200\n */\n icons?: Icon[];\n /**\n * The priority given to this payment method type in the list of payment method types shown to the buyer.\n * A lower value relative to other payment method types means a higher position on the list.\n * @min 1\n * @max 10000\n */\n priority?: number;\n /** Whether the merchant cannot choose to accept payments from this payment method type. */\n hidden?: boolean;\n /** Indicates that payment method type is restricted in provided country. */\n countryRestricted?: boolean;\n /**\n * Minimum payment amount that can be made with this payment method type.\n * If the request omits `currency_code`, the field is not set because its value depends on the currency.\n * @decimalValue options { maxScale:8, gte:0.00 }\n */\n minPaymentAmount?: string | null;\n}\n\nexport interface GetSitePaymentMethodTypeRequest {\n /**\n * Site payment method type ID.\n * @format GUID\n */\n sitePaymentMethodTypeId: string;\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\nexport enum RequestedFields {\n UNKNOWN_REQUESTED_FIELD = 'UNKNOWN_REQUESTED_FIELD',\n ALLOWED_CURRENCIES = 'ALLOWED_CURRENCIES',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELD'\n | 'ALLOWED_CURRENCIES';\n\nexport interface GetSitePaymentMethodTypeResponse {\n /** Requested site payment method type. */\n sitePaymentMethodType?: SitePaymentMethodType;\n}\n\nexport interface ListSitePaymentMethodTypesRequest {\n /**\n * IDs or legacy IDs of site payment method types to retrieve.\n * @maxSize 250\n * @minLength 1\n * @maxLength 50\n */\n ids?: string[];\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to filter payment method types and determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface ListSitePaymentMethodTypesResponse {\n /** List of site payment method types. */\n sitePaymentMethodTypes?: SitePaymentMethodType[];\n}\n\ntype SitePaymentMethodTypeNonNullablePaths =\n | `_id`\n | `features.expressFlow.supported`\n | `features.regularFlow.supported`\n | `features.disputes.supported`\n | `features.installments.supported`\n | `features.installments.allowedCountryCodes`\n | `features.refunds.supported`\n | `features.authCapture.supported`\n | `features.regularTokenization.supported`\n | `features.customTokenization.supported`\n | `features.nextAction.iframe.supported`\n | `features.nextAction.newTab.supported`\n | `features.nextAction.fullPageRedirect.supported`\n | `features.nextAction.barcode.supported`\n | `features.nextAction.qrCode.supported`\n | `features.credentialOnFile.supported`\n | `features.moto.supported`\n | `features.promotionalMessages.supported`\n | `merchantFlow.icons`\n | `merchantFlow.icons.${number}.format`\n | `merchantFlow.priority`\n | `merchantFlow.promoted`\n | `merchantFlow.hidden`\n | `merchantFlow.countryRestricted`\n | `buyerFlow.icons`\n | `buyerFlow.icons.${number}.format`\n | `buyerFlow.priority`\n | `buyerFlow.hidden`\n | `buyerFlow.countryRestricted`\n | `brandOnly`\n | `inPerson`\n | `currencyRestricted`\n | `currencyRestrictionEnabled`\n | `allowedCurrencyCodes`;\n\n/**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * @param sitePaymentMethodTypeId - Site payment method type ID.\n * @public\n * @documentationMaturity preview\n * @requiredField sitePaymentMethodTypeId\n * @permissionId PAYMENTS.SITE_PAYMENT_METHOD_TYPE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Requested site payment method type.\n * @fqn wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.GetSitePaymentMethodType\n */\nexport async function getSitePaymentMethodType(\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n): Promise<\n NonNullablePaths<SitePaymentMethodType, SitePaymentMethodTypeNonNullablePaths>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n sitePaymentMethodTypeId: sitePaymentMethodTypeId,\n languageCode: options?.languageCode,\n countryCode: options?.countryCode,\n currencyCode: options?.currencyCode,\n requestedFields: options?.requestedFields,\n });\n\n const reqOpts =\n ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType.getSitePaymentMethodType(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'sitePaymentMethodType.merchantFlow.icons.image' },\n { path: 'sitePaymentMethodType.buyerFlow.icons.image' },\n ],\n },\n ])\n )?.sitePaymentMethodType!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n sitePaymentMethodTypeId: '$[0]',\n languageCode: '$[1].languageCode',\n countryCode: '$[1].countryCode',\n currencyCode: '$[1].currencyCode',\n requestedFields: '$[1].requestedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['sitePaymentMethodTypeId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSitePaymentMethodTypeOptions {\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\n/**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n * @public\n * @documentationMaturity preview\n * @permissionId PAYMENTS.SITE_PAYMENT_METHOD_TYPE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.ListSitePaymentMethodTypes\n */\nexport async function listSitePaymentMethodTypes(\n options?: ListSitePaymentMethodTypesOptions\n): Promise<\n NonNullablePaths<\n ListSitePaymentMethodTypesResponse,\n {\n [P in SitePaymentMethodTypeNonNullablePaths]: `sitePaymentMethodTypes.${number}.${P}`;\n }[SitePaymentMethodTypeNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n ids: options?.ids,\n languageCode: options?.languageCode,\n countryCode: options?.countryCode,\n currencyCode: options?.currencyCode,\n requestedFields: options?.requestedFields,\n });\n\n const reqOpts =\n ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType.listSitePaymentMethodTypes(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'sitePaymentMethodTypes.merchantFlow.icons.image' },\n { path: 'sitePaymentMethodTypes.buyerFlow.icons.image' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n ids: '$[0].ids',\n languageCode: '$[0].languageCode',\n countryCode: '$[0].countryCode',\n currencyCode: '$[0].currencyCode',\n requestedFields: '$[0].requestedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListSitePaymentMethodTypesOptions {\n /**\n * IDs or legacy IDs of site payment method types to retrieve.\n * @maxSize 250\n * @minLength 1\n * @maxLength 50\n */\n ids?: string[];\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to filter payment method types and determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/payment-method-types',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/payments/site-payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier-services._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'events._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'events.wixapps.net': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'invoices._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'pricing-plans.wixapps.net': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'vod-server._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'www.wixhotels.com': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'tpa.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath:\n '/payments/site-payment-method-types/v1/site-payment-method-types',\n destPath: '/v1/site-payment-method-types',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath:\n '/payments/site-payment-method-types/v1/site-payment-method-types',\n destPath: '/v1/site-payment-method-types',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_site-payment-method-types';\n\n/**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n */\nexport function getSitePaymentMethodType(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSitePaymentMethodType({ host }: any) {\n const metadata = {\n entityFqdn:\n 'wix.payments.site_payment_method_types.v1.site_payment_method_type',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.GetSitePaymentMethodType',\n packageName: PACKAGE_NAME,\n url: resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n {\n protoPath: '/v1/site-payment-method-types/{sitePaymentMethodTypeId}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getSitePaymentMethodType;\n}\n\n/**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n */\nexport function listSitePaymentMethodTypes(\n payload: object\n): RequestOptionsFactory<any> {\n function __listSitePaymentMethodTypes({ host }: any) {\n const metadata = {\n entityFqdn:\n 'wix.payments.site_payment_method_types.v1.site_payment_method_type',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.ListSitePaymentMethodTypes',\n packageName: PACKAGE_NAME,\n url: resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n { protoPath: '/v1/site-payment-method-types', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSitePaymentMethodTypes;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetSitePaymentMethodTypeOptions,\n ListSitePaymentMethodTypesOptions,\n ListSitePaymentMethodTypesResponse,\n SitePaymentMethodType,\n getSitePaymentMethodType as universalGetSitePaymentMethodType,\n listSitePaymentMethodTypes as universalListSitePaymentMethodTypes,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\ntype SitePaymentMethodTypeNonNullablePaths =\n | `_id`\n | `features.expressFlow.supported`\n | `features.regularFlow.supported`\n | `features.disputes.supported`\n | `features.installments.supported`\n | `features.installments.allowedCountryCodes`\n | `features.refunds.supported`\n | `features.authCapture.supported`\n | `features.regularTokenization.supported`\n | `features.customTokenization.supported`\n | `features.nextAction.iframe.supported`\n | `features.nextAction.newTab.supported`\n | `features.nextAction.fullPageRedirect.supported`\n | `features.nextAction.barcode.supported`\n | `features.nextAction.qrCode.supported`\n | `features.credentialOnFile.supported`\n | `features.moto.supported`\n | `features.promotionalMessages.supported`\n | `merchantFlow.icons`\n | `merchantFlow.icons.${number}.format`\n | `merchantFlow.priority`\n | `merchantFlow.promoted`\n | `merchantFlow.hidden`\n | `merchantFlow.countryRestricted`\n | `buyerFlow.icons`\n | `buyerFlow.icons.${number}.format`\n | `buyerFlow.priority`\n | `buyerFlow.hidden`\n | `buyerFlow.countryRestricted`\n | `brandOnly`\n | `inPerson`\n | `currencyRestricted`\n | `currencyRestrictionEnabled`\n | `allowedCurrencyCodes`;\n\nexport function getSitePaymentMethodType(\n httpClient: HttpClient\n): GetSitePaymentMethodTypeSignature {\n return (\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n ) =>\n universalGetSitePaymentMethodType(\n sitePaymentMethodTypeId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetSitePaymentMethodTypeSignature {\n /**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * @param - Site payment method type ID.\n * @returns Requested site payment method type.\n */\n (\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n ): Promise<\n NonNullablePaths<\n SitePaymentMethodType,\n SitePaymentMethodTypeNonNullablePaths\n >\n >;\n}\n\nexport function listSitePaymentMethodTypes(\n httpClient: HttpClient\n): ListSitePaymentMethodTypesSignature {\n return (options?: ListSitePaymentMethodTypesOptions) =>\n universalListSitePaymentMethodTypes(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListSitePaymentMethodTypesSignature {\n /**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n */\n (options?: ListSitePaymentMethodTypesOptions): Promise<\n NonNullablePaths<\n ListSitePaymentMethodTypesResponse,\n {\n [P in SitePaymentMethodTypeNonNullablePaths]: `sitePaymentMethodTypes.${number}.${P}`;\n }[SitePaymentMethodTypeNonNullablePaths]\n >\n >;\n}\n\nexport {\n AuthCapture,\n Barcode,\n BuyerFlow,\n CredentialOnFile,\n CustomTokenization,\n Disputes,\n ExpressFlow,\n Features,\n Format,\n FullPageRedirect,\n GetSitePaymentMethodTypeOptions,\n GetSitePaymentMethodTypeRequest,\n GetSitePaymentMethodTypeResponse,\n IFrame,\n Icon,\n Installments,\n ListSitePaymentMethodTypesOptions,\n ListSitePaymentMethodTypesRequest,\n ListSitePaymentMethodTypesResponse,\n MerchantFlow,\n Moto,\n NewTab,\n NextAction,\n PromotionalMessages,\n QrCode,\n Refunds,\n RegularFlow,\n RegularTokenization,\n RequestedFields,\n SitePaymentMethodType,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n","import {\n getSitePaymentMethodType as publicGetSitePaymentMethodType,\n listSitePaymentMethodTypes as publicListSitePaymentMethodTypes,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getSitePaymentMethodType: MaybeContext<\n BuildRESTFunction<typeof publicGetSitePaymentMethodType> &\n typeof publicGetSitePaymentMethodType\n> = /*#__PURE__*/ createRESTModule(publicGetSitePaymentMethodType);\nexport const listSitePaymentMethodTypes: MaybeContext<\n BuildRESTFunction<typeof publicListSitePaymentMethodTypes> &\n typeof publicListSitePaymentMethodTypes\n> = /*#__PURE__*/ createRESTModule(publicListSitePaymentMethodTypes);\n\nexport {\n Format,\n RequestedFields,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\nexport {\n SitePaymentMethodType,\n Features,\n IFrame,\n NewTab,\n FullPageRedirect,\n Barcode,\n QrCode,\n ExpressFlow,\n RegularFlow,\n Disputes,\n Installments,\n Refunds,\n AuthCapture,\n RegularTokenization,\n CustomTokenization,\n NextAction,\n CredentialOnFile,\n Moto,\n PromotionalMessages,\n MerchantFlow,\n Icon,\n BuyerFlow,\n GetSitePaymentMethodTypeRequest,\n GetSitePaymentMethodTypeResponse,\n ListSitePaymentMethodTypesRequest,\n ListSitePaymentMethodTypesResponse,\n GetSitePaymentMethodTypeOptions,\n ListSitePaymentMethodTypesOptions,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,kCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,0EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA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AAG1B,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,8BAGK,2DAAiBA,2BAAgC;","names":["getSitePaymentMethodType","listSitePaymentMethodTypes","import_rest_modules","Format","RequestedFields","getSitePaymentMethodType","sdkTransformError","listSitePaymentMethodTypes","getSitePaymentMethodType","listSitePaymentMethodTypes","import_rest_modules","getSitePaymentMethodType","listSitePaymentMethodTypes"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
1
|
+
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
2
|
import { GetSitePaymentMethodTypeOptions, SitePaymentMethodType, ListSitePaymentMethodTypesOptions, ListSitePaymentMethodTypesResponse } from './index.typings.mjs';
|
|
3
3
|
export { AuthCapture, Barcode, BuyerFlow, CredentialOnFile, CustomTokenization, Disputes, ExpressFlow, Features, Format, FullPageRedirect, GetSitePaymentMethodTypeRequest, GetSitePaymentMethodTypeResponse, IFrame, Icon, Installments, ListSitePaymentMethodTypesRequest, MerchantFlow, Moto, NewTab, NextAction, PromotionalMessages, QrCode, Refunds, RegularFlow, RegularTokenization, RequestedFields } from './index.typings.mjs';
|
|
4
4
|
|
|
5
|
+
type SitePaymentMethodTypeNonNullablePaths = `_id` | `features.expressFlow.supported` | `features.regularFlow.supported` | `features.disputes.supported` | `features.installments.supported` | `features.installments.allowedCountryCodes` | `features.refunds.supported` | `features.authCapture.supported` | `features.regularTokenization.supported` | `features.customTokenization.supported` | `features.nextAction.iframe.supported` | `features.nextAction.newTab.supported` | `features.nextAction.fullPageRedirect.supported` | `features.nextAction.barcode.supported` | `features.nextAction.qrCode.supported` | `features.credentialOnFile.supported` | `features.moto.supported` | `features.promotionalMessages.supported` | `merchantFlow.icons` | `merchantFlow.icons.${number}.format` | `merchantFlow.priority` | `merchantFlow.promoted` | `merchantFlow.hidden` | `merchantFlow.countryRestricted` | `buyerFlow.icons` | `buyerFlow.icons.${number}.format` | `buyerFlow.priority` | `buyerFlow.hidden` | `buyerFlow.countryRestricted` | `brandOnly` | `inPerson` | `currencyRestricted` | `currencyRestrictionEnabled` | `allowedCurrencyCodes`;
|
|
5
6
|
declare function getSitePaymentMethodType$1(httpClient: HttpClient): GetSitePaymentMethodTypeSignature;
|
|
6
7
|
interface GetSitePaymentMethodTypeSignature {
|
|
7
8
|
/**
|
|
@@ -16,7 +17,7 @@ interface GetSitePaymentMethodTypeSignature {
|
|
|
16
17
|
* @param - Site payment method type ID.
|
|
17
18
|
* @returns Requested site payment method type.
|
|
18
19
|
*/
|
|
19
|
-
(sitePaymentMethodTypeId: string, options?: GetSitePaymentMethodTypeOptions
|
|
20
|
+
(sitePaymentMethodTypeId: string, options?: GetSitePaymentMethodTypeOptions): Promise<NonNullablePaths<SitePaymentMethodType, SitePaymentMethodTypeNonNullablePaths>>;
|
|
20
21
|
}
|
|
21
22
|
declare function listSitePaymentMethodTypes$1(httpClient: HttpClient): ListSitePaymentMethodTypesSignature;
|
|
22
23
|
interface ListSitePaymentMethodTypesSignature {
|
|
@@ -34,7 +35,9 @@ interface ListSitePaymentMethodTypesSignature {
|
|
|
34
35
|
* Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.
|
|
35
36
|
* `currency` is used to determine the eligibility of payment method types for the provided currency.
|
|
36
37
|
*/
|
|
37
|
-
(options?: ListSitePaymentMethodTypesOptions
|
|
38
|
+
(options?: ListSitePaymentMethodTypesOptions): Promise<NonNullablePaths<ListSitePaymentMethodTypesResponse, {
|
|
39
|
+
[P in SitePaymentMethodTypeNonNullablePaths]: `sitePaymentMethodTypes.${number}.${P}`;
|
|
40
|
+
}[SitePaymentMethodTypeNonNullablePaths]>>;
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
declare const getSitePaymentMethodType: MaybeContext<BuildRESTFunction<typeof getSitePaymentMethodType$1> & typeof getSitePaymentMethodType$1>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.ts","../../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.http.ts","../../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.public.ts","../../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.http.js';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** A way to pay online or offline for goods or services offered by a specific site. */\nexport interface SitePaymentMethodType {\n /**\n * Payment method type ID.\n * @format GUID\n * @immutable\n */\n _id?: string;\n /**\n * Value used buy some legacy APIs to refer to this payment method type. Can be empty.\n * @minLength 1\n * @maxLength 50\n * @immutable\n */\n legacyId?: string | null;\n /**\n * Payment method type display name, based on locale.\n *\n * Used by Wix when displaying the payment method type, such as in the payment settings page for merchants, or the checkout page for buyers.\n *\n * Define your locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the descriptions for the `country_code` and `language_code` parameters for those methods.\n * @minLength 1\n * @maxLength 100\n */\n displayName?: string | null;\n /**\n * Payment method type description, based on locale.\n *\n * Used by Wix when displaying the payment method type, such as in the payment settings page for merchants, or the checkout page for buyers.\n *\n * Define your locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the descriptions for the `country_code` and `language_code` parameters for those methods.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n /** Features supported for this payment method type. */\n features?: Features;\n /** Settings that determine if and how to display this payment method type in the merchant flow. The merchant flow is the process a merchant goes through to configure which payment method types they accept on their site. */\n merchantFlow?: MerchantFlow;\n /** Settings that determine if and how to display this payment method type in the buyer flow. The buyer flow is the process a buyer goes through to make a purchase att checkout. */\n buyerFlow?: BuyerFlow;\n /**\n * Whether this payment method type is only used to represent a supported payment brand for another payment method type.\n *\n * For example, a Visa payment method is used to indicate that Visa can be used for credit card transactions. But the Visa payment method type is not used to accept payments. Instead, the credit card payment method type is used.\n *\n * Brand-only payment method types cannot be used to accept payments, and are not listed as a payment method type in a site's dashboard.\n */\n brandOnly?: boolean;\n /** Whether the payment method type can only be used for in-person payments, such as cash, point-of-sale payments, and card readers. */\n inPerson?: boolean;\n /**\n * Time (in seconds after which a transaction is marked as expired if it is not completed.\n *\n * Max: `15552000` (180 days)\n * @min 1\n * @max 15552000\n */\n transactionExpirationDelayInSeconds?: number | null;\n /** Indicates that payment method type is restricted for the provided `currency_code`. */\n currencyRestricted?: boolean;\n /** Indicates the payment method type has currency restriction and it is enabled. */\n currencyRestrictionEnabled?: boolean;\n /**\n * Allowed currencies\n * @maxSize 100\n * @format CURRENCY\n */\n allowedCurrencyCodes?: string[];\n}\n\nexport interface Features {\n /** Express flow configuration. */\n expressFlow?: ExpressFlow;\n /** Regular flow configuration. */\n regularFlow?: RegularFlow;\n /** Disputes configuration. */\n disputes?: Disputes;\n /** Installments configuration. */\n installments?: Installments;\n /** Refunds configuration. */\n refunds?: Refunds;\n /** Authorize and capture configuration. */\n authCapture?: AuthCapture;\n /** Regular tokenization configuration. */\n regularTokenization?: RegularTokenization;\n /** Custom tokenization configuration. */\n customTokenization?: CustomTokenization;\n /** Next action configuration. */\n nextAction?: NextAction;\n /** Credential-on-File (CoF) configuration. */\n credentialOnFile?: CredentialOnFile;\n /** Mail Order/Telephone Order (MOTO) configuration. */\n moto?: Moto;\n /** Promotional message configuration. */\n promotionalMessages?: PromotionalMessages;\n}\n\nexport interface IFrame {\n /** Whether the next payment action can be shown in an iframe. */\n supported?: boolean;\n}\n\nexport interface NewTab {\n /** Whether the next payment action can be shown in a new tab. */\n supported?: boolean;\n}\n\nexport interface FullPageRedirect {\n /** Whether the next payment action can be shown by redirecting to a new page. */\n supported?: boolean;\n}\n\nexport interface Barcode {\n /** Whether the next payment action can be shown as a barcode to scan. */\n supported?: boolean;\n}\n\nexport interface QrCode {\n /** Whether the next payment action can be shown as a QR code to scan. */\n supported?: boolean;\n}\n\nexport interface ExpressFlow {\n /** Whether this payment method type can be used in an express flow on checkout. */\n supported?: boolean;\n}\n\nexport interface RegularFlow {\n /** Whether this payment method type can be used in a regular flow on checkout. */\n supported?: boolean;\n}\n\nexport interface Disputes {\n /** Whether disputes are supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface Installments {\n /** Whether installments are supported for this payment method type. */\n supported?: boolean;\n /**\n * Max number of installments that can be configured by a provider.\n * @min 2\n * @max 36\n */\n maxInstallmentLimit?: number | null;\n /**\n * Countries for which installments can be enabled.\n * @format COUNTRY\n * @minSize 1\n * @maxSize 200\n */\n allowedCountryCodes?: string[];\n}\n\nexport interface Refunds {\n /** Whether refunds are supported for this payment method type. */\n supported?: boolean;\n /**\n * Maximum period in which payments made using this payment method type can be refunded.\n * @min 1\n * @max 365\n */\n maxRefundabilityPeriodInDays?: number | null;\n}\n\nexport interface AuthCapture {\n /** Whether the authorize and capture flow is supported for this payment method type. */\n supported?: boolean;\n /**\n * Period to wait for the auth capture to be completed before canceling the transaction.\n * @min 1\n * @max 365\n */\n maxCapturePeriodInDays?: number | null;\n}\n\nexport interface RegularTokenization {\n /** Whether the default tokenization mechanism can be configured for this payment method type. */\n supported?: boolean;\n}\n\nexport interface CustomTokenization {\n /** Whether a custom tokenization mechanism can be configured for this payment method type, such as a provider-specific tokenization method. */\n supported?: boolean;\n}\n\nexport interface NextAction {\n /** iframe configuration. */\n iframe?: IFrame;\n /** New tab configuration. */\n newTab?: NewTab;\n /** Full page redirect configuration. */\n fullPageRedirect?: FullPageRedirect;\n /** Barcode configuration. */\n barcode?: Barcode;\n /** QR code configuration. */\n qrCode?: QrCode;\n}\n\nexport interface CredentialOnFile {\n /** Whether the Credential-on-File (CoF) feature is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface Moto {\n /** Whether Mail Order/Telephone Order (MOTO) is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface PromotionalMessages {\n /** Whether promotional messages is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface MerchantFlow {\n /**\n * Details about the icons to display for this payment method type on the merchant's Accept Payments page in the site dashboard. Icons are localized according to the locale of the call.\n *\n * Define a locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the method descriptions.\n * @maxSize 200\n */\n icons?: Icon[];\n /**\n * Priority given to this payment method type in the list shown to the merchant.\n * A lower value relative to other payment method types means a higher position on the list.\n * @min 1\n * @max 10000\n */\n priority?: number;\n /** Whether the payment method type is promoted. Promoted payment method types are displayed more prominently on the Accept Payments page. */\n promoted?: boolean;\n /** Whether the merchant cannot choose to accept payments from this payment method type. */\n hidden?: boolean;\n /** Indicates that payment method type is restricted in provided country. */\n countryRestricted?: boolean;\n}\n\n/**\n * Example url:\n * http://images-wixmp-6613fa290e8c1ac70a0297b6.wixmp.com/payment-methods/{domain}/{extension}/{id}.{extension}\n */\nexport interface Icon {\n /** Icon image. */\n image?: string;\n /**\n * Icon tag. Payment method types can have multiple icons, and tags are used to differentiate between them.\n * For example, the UI design for multiple payment method types is upgraded, and now they each have an old icon tagged \"v1\" and a new icon tagged \"v2\". Developers can then easily choose to display all the original \"v1\" style of icons, or all the new \"v2\" style.\n * @minLength 1\n * @maxLength 100\n */\n tag?: string | null;\n /** Icon image format. */\n format?: FormatWithLiterals;\n}\n\nexport enum Format {\n UNKNOWN_FORMAT = 'UNKNOWN_FORMAT',\n SVG = 'SVG',\n PNG = 'PNG',\n}\n\n/** @enumType */\nexport type FormatWithLiterals = Format | 'UNKNOWN_FORMAT' | 'SVG' | 'PNG';\n\nexport interface BuyerFlow {\n /**\n * Details about the icons to display for this payment method type on a site's checkout page. Icons are localized according to the locale of the call.\n *\n * Define a locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the method descriptions.\n * @maxSize 200\n */\n icons?: Icon[];\n /**\n * The priority given to this payment method type in the list of payment method types shown to the buyer.\n * A lower value relative to other payment method types means a higher position on the list.\n * @min 1\n * @max 10000\n */\n priority?: number;\n /** Whether the merchant cannot choose to accept payments from this payment method type. */\n hidden?: boolean;\n /** Indicates that payment method type is restricted in provided country. */\n countryRestricted?: boolean;\n /**\n * Minimum payment amount that can be made with this payment method type.\n * If the request omits `currency_code`, the field is not set because its value depends on the currency.\n * @decimalValue options { maxScale:8, gte:0.00 }\n */\n minPaymentAmount?: string | null;\n}\n\nexport interface GetSitePaymentMethodTypeRequest {\n /**\n * Site payment method type ID.\n * @format GUID\n */\n sitePaymentMethodTypeId: string;\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\nexport enum RequestedFields {\n UNKNOWN_REQUESTED_FIELD = 'UNKNOWN_REQUESTED_FIELD',\n ALLOWED_CURRENCIES = 'ALLOWED_CURRENCIES',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELD'\n | 'ALLOWED_CURRENCIES';\n\nexport interface GetSitePaymentMethodTypeResponse {\n /** Requested site payment method type. */\n sitePaymentMethodType?: SitePaymentMethodType;\n}\n\nexport interface ListSitePaymentMethodTypesRequest {\n /**\n * IDs or legacy IDs of site payment method types to retrieve.\n * @maxSize 250\n * @minLength 1\n * @maxLength 50\n */\n ids?: string[];\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to filter payment method types and determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface ListSitePaymentMethodTypesResponse {\n /** List of site payment method types. */\n sitePaymentMethodTypes?: SitePaymentMethodType[];\n}\n\ntype SitePaymentMethodTypeNonNullablePaths =\n | `_id`\n | `features.expressFlow.supported`\n | `features.regularFlow.supported`\n | `features.disputes.supported`\n | `features.installments.supported`\n | `features.installments.allowedCountryCodes`\n | `features.refunds.supported`\n | `features.authCapture.supported`\n | `features.regularTokenization.supported`\n | `features.customTokenization.supported`\n | `features.nextAction.iframe.supported`\n | `features.nextAction.newTab.supported`\n | `features.nextAction.fullPageRedirect.supported`\n | `features.nextAction.barcode.supported`\n | `features.nextAction.qrCode.supported`\n | `features.credentialOnFile.supported`\n | `features.moto.supported`\n | `features.promotionalMessages.supported`\n | `merchantFlow.icons`\n | `merchantFlow.icons.${number}.format`\n | `merchantFlow.priority`\n | `merchantFlow.promoted`\n | `merchantFlow.hidden`\n | `merchantFlow.countryRestricted`\n | `buyerFlow.icons`\n | `buyerFlow.icons.${number}.format`\n | `buyerFlow.priority`\n | `buyerFlow.hidden`\n | `buyerFlow.countryRestricted`\n | `brandOnly`\n | `inPerson`\n | `currencyRestricted`\n | `currencyRestrictionEnabled`\n | `allowedCurrencyCodes`;\n\n/**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * @param sitePaymentMethodTypeId - Site payment method type ID.\n * @public\n * @documentationMaturity preview\n * @requiredField sitePaymentMethodTypeId\n * @permissionId PAYMENTS.SITE_PAYMENT_METHOD_TYPE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Requested site payment method type.\n * @fqn wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.GetSitePaymentMethodType\n */\nexport async function getSitePaymentMethodType(\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n): Promise<\n NonNullablePaths<SitePaymentMethodType, SitePaymentMethodTypeNonNullablePaths>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n sitePaymentMethodTypeId: sitePaymentMethodTypeId,\n languageCode: options?.languageCode,\n countryCode: options?.countryCode,\n currencyCode: options?.currencyCode,\n requestedFields: options?.requestedFields,\n });\n\n const reqOpts =\n ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType.getSitePaymentMethodType(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'sitePaymentMethodType.merchantFlow.icons.image' },\n { path: 'sitePaymentMethodType.buyerFlow.icons.image' },\n ],\n },\n ])\n )?.sitePaymentMethodType!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n sitePaymentMethodTypeId: '$[0]',\n languageCode: '$[1].languageCode',\n countryCode: '$[1].countryCode',\n currencyCode: '$[1].currencyCode',\n requestedFields: '$[1].requestedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['sitePaymentMethodTypeId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSitePaymentMethodTypeOptions {\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\n/**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n * @public\n * @documentationMaturity preview\n * @permissionId PAYMENTS.SITE_PAYMENT_METHOD_TYPE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.ListSitePaymentMethodTypes\n */\nexport async function listSitePaymentMethodTypes(\n options?: ListSitePaymentMethodTypesOptions\n): Promise<\n NonNullablePaths<\n ListSitePaymentMethodTypesResponse,\n {\n [P in SitePaymentMethodTypeNonNullablePaths]: `sitePaymentMethodTypes.${number}.${P}`;\n }[SitePaymentMethodTypeNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n ids: options?.ids,\n languageCode: options?.languageCode,\n countryCode: options?.countryCode,\n currencyCode: options?.currencyCode,\n requestedFields: options?.requestedFields,\n });\n\n const reqOpts =\n ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType.listSitePaymentMethodTypes(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'sitePaymentMethodTypes.merchantFlow.icons.image' },\n { path: 'sitePaymentMethodTypes.buyerFlow.icons.image' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n ids: '$[0].ids',\n languageCode: '$[0].languageCode',\n countryCode: '$[0].countryCode',\n currencyCode: '$[0].currencyCode',\n requestedFields: '$[0].requestedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListSitePaymentMethodTypesOptions {\n /**\n * IDs or legacy IDs of site payment method types to retrieve.\n * @maxSize 250\n * @minLength 1\n * @maxLength 50\n */\n ids?: string[];\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to filter payment method types and determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/payment-method-types',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/payments/site-payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier-services._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'events._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'events.wixapps.net': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'invoices._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'pricing-plans.wixapps.net': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'vod-server._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'www.wixhotels.com': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'tpa.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath:\n '/payments/site-payment-method-types/v1/site-payment-method-types',\n destPath: '/v1/site-payment-method-types',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath:\n '/payments/site-payment-method-types/v1/site-payment-method-types',\n destPath: '/v1/site-payment-method-types',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_site-payment-method-types';\n\n/**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n */\nexport function getSitePaymentMethodType(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSitePaymentMethodType({ host }: any) {\n const metadata = {\n entityFqdn:\n 'wix.payments.site_payment_method_types.v1.site_payment_method_type',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.GetSitePaymentMethodType',\n packageName: PACKAGE_NAME,\n url: resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n {\n protoPath: '/v1/site-payment-method-types/{sitePaymentMethodTypeId}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getSitePaymentMethodType;\n}\n\n/**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n */\nexport function listSitePaymentMethodTypes(\n payload: object\n): RequestOptionsFactory<any> {\n function __listSitePaymentMethodTypes({ host }: any) {\n const metadata = {\n entityFqdn:\n 'wix.payments.site_payment_method_types.v1.site_payment_method_type',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.ListSitePaymentMethodTypes',\n packageName: PACKAGE_NAME,\n url: resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n { protoPath: '/v1/site-payment-method-types', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSitePaymentMethodTypes;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n GetSitePaymentMethodTypeOptions,\n ListSitePaymentMethodTypesOptions,\n ListSitePaymentMethodTypesResponse,\n SitePaymentMethodType,\n getSitePaymentMethodType as universalGetSitePaymentMethodType,\n listSitePaymentMethodTypes as universalListSitePaymentMethodTypes,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\nexport function getSitePaymentMethodType(\n httpClient: HttpClient\n): GetSitePaymentMethodTypeSignature {\n return (\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n ) =>\n universalGetSitePaymentMethodType(\n sitePaymentMethodTypeId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetSitePaymentMethodTypeSignature {\n /**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * @param - Site payment method type ID.\n * @returns Requested site payment method type.\n */\n (\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions | undefined\n ): Promise<SitePaymentMethodType>;\n}\n\nexport function listSitePaymentMethodTypes(\n httpClient: HttpClient\n): ListSitePaymentMethodTypesSignature {\n return (options?: ListSitePaymentMethodTypesOptions) =>\n universalListSitePaymentMethodTypes(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListSitePaymentMethodTypesSignature {\n /**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n */\n (\n options?: ListSitePaymentMethodTypesOptions | undefined\n ): Promise<ListSitePaymentMethodTypesResponse>;\n}\n\nexport {\n AuthCapture,\n Barcode,\n BuyerFlow,\n CredentialOnFile,\n CustomTokenization,\n Disputes,\n ExpressFlow,\n Features,\n Format,\n FullPageRedirect,\n GetSitePaymentMethodTypeOptions,\n GetSitePaymentMethodTypeRequest,\n GetSitePaymentMethodTypeResponse,\n IFrame,\n Icon,\n Installments,\n ListSitePaymentMethodTypesOptions,\n ListSitePaymentMethodTypesRequest,\n ListSitePaymentMethodTypesResponse,\n MerchantFlow,\n Moto,\n NewTab,\n NextAction,\n PromotionalMessages,\n QrCode,\n Refunds,\n RegularFlow,\n RegularTokenization,\n RequestedFields,\n SitePaymentMethodType,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n","import {\n getSitePaymentMethodType as publicGetSitePaymentMethodType,\n listSitePaymentMethodTypes as publicListSitePaymentMethodTypes,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getSitePaymentMethodType: MaybeContext<\n BuildRESTFunction<typeof publicGetSitePaymentMethodType> &\n typeof publicGetSitePaymentMethodType\n> = /*#__PURE__*/ createRESTModule(publicGetSitePaymentMethodType);\nexport const listSitePaymentMethodTypes: MaybeContext<\n BuildRESTFunction<typeof publicListSitePaymentMethodTypes> &\n typeof publicListSitePaymentMethodTypes\n> = /*#__PURE__*/ createRESTModule(publicListSitePaymentMethodTypes);\n\nexport {\n Format,\n RequestedFields,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\nexport {\n SitePaymentMethodType,\n Features,\n IFrame,\n NewTab,\n FullPageRedirect,\n Barcode,\n QrCode,\n ExpressFlow,\n RegularFlow,\n Disputes,\n Installments,\n Refunds,\n AuthCapture,\n RegularTokenization,\n CustomTokenization,\n NextAction,\n CredentialOnFile,\n Moto,\n PromotionalMessages,\n MerchantFlow,\n Icon,\n BuyerFlow,\n GetSitePaymentMethodTypeRequest,\n GetSitePaymentMethodTypeResponse,\n ListSitePaymentMethodTypesRequest,\n ListSitePaymentMethodTypesResponse,\n GetSitePaymentMethodTypeOptions,\n ListSitePaymentMethodTypesOptions,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,0EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kCAAkC;AAAA,MAChC;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,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BAAa,YAAY,MAAM;AAE/B,WAAO;AAAA,MACL,eAAe,OAAO,MAAM;AAAA,QAC1B;AAAA,UACE,aAAa;AAAA,UACb,OAAO;AAAA,YACL,EAAE,MAAM,kDAAkD;AAAA,YAC1D,EAAE,MAAM,+CAA+C;AAAA,UACzD;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,KAAK;AAAA,UACL,cAAc;AAAA,UACd,aAAa;AAAA,UACb,cAAc;AAAA,UACd,iBAAiB;AAAA,QACnB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE1mBO,SAASC,0BACd,YACmC;AACnC,SAAO,CACL,yBACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAqBO,SAASC,4BACd,YACqC;AACrC,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACnDA,SAAS,wBAAwB;AAG1B,IAAMC,4BAGK,iCAAiBA,yBAA8B;AAC1D,IAAMC,8BAGK,iCAAiBA,2BAAgC;","names":["Format","RequestedFields","getSitePaymentMethodType","listSitePaymentMethodTypes","getSitePaymentMethodType","listSitePaymentMethodTypes","getSitePaymentMethodType","listSitePaymentMethodTypes"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.ts","../../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.http.ts","../../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.public.ts","../../../src/payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.http.js';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** A way to pay online or offline for goods or services offered by a specific site. */\nexport interface SitePaymentMethodType {\n /**\n * Payment method type ID.\n * @format GUID\n * @immutable\n */\n _id?: string;\n /**\n * Value used buy some legacy APIs to refer to this payment method type. Can be empty.\n * @minLength 1\n * @maxLength 50\n * @immutable\n */\n legacyId?: string | null;\n /**\n * Payment method type display name, based on locale.\n *\n * Used by Wix when displaying the payment method type, such as in the payment settings page for merchants, or the checkout page for buyers.\n *\n * Define your locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the descriptions for the `country_code` and `language_code` parameters for those methods.\n * @minLength 1\n * @maxLength 100\n */\n displayName?: string | null;\n /**\n * Payment method type description, based on locale.\n *\n * Used by Wix when displaying the payment method type, such as in the payment settings page for merchants, or the checkout page for buyers.\n *\n * Define your locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the descriptions for the `country_code` and `language_code` parameters for those methods.\n * @minLength 1\n * @maxLength 1000\n */\n description?: string | null;\n /** Features supported for this payment method type. */\n features?: Features;\n /** Settings that determine if and how to display this payment method type in the merchant flow. The merchant flow is the process a merchant goes through to configure which payment method types they accept on their site. */\n merchantFlow?: MerchantFlow;\n /** Settings that determine if and how to display this payment method type in the buyer flow. The buyer flow is the process a buyer goes through to make a purchase att checkout. */\n buyerFlow?: BuyerFlow;\n /**\n * Whether this payment method type is only used to represent a supported payment brand for another payment method type.\n *\n * For example, a Visa payment method is used to indicate that Visa can be used for credit card transactions. But the Visa payment method type is not used to accept payments. Instead, the credit card payment method type is used.\n *\n * Brand-only payment method types cannot be used to accept payments, and are not listed as a payment method type in a site's dashboard.\n */\n brandOnly?: boolean;\n /** Whether the payment method type can only be used for in-person payments, such as cash, point-of-sale payments, and card readers. */\n inPerson?: boolean;\n /**\n * Time (in seconds after which a transaction is marked as expired if it is not completed.\n *\n * Max: `15552000` (180 days)\n * @min 1\n * @max 15552000\n */\n transactionExpirationDelayInSeconds?: number | null;\n /** Indicates that payment method type is restricted for the provided `currency_code`. */\n currencyRestricted?: boolean;\n /** Indicates the payment method type has currency restriction and it is enabled. */\n currencyRestrictionEnabled?: boolean;\n /**\n * Allowed currencies\n * @maxSize 100\n * @format CURRENCY\n */\n allowedCurrencyCodes?: string[];\n}\n\nexport interface Features {\n /** Express flow configuration. */\n expressFlow?: ExpressFlow;\n /** Regular flow configuration. */\n regularFlow?: RegularFlow;\n /** Disputes configuration. */\n disputes?: Disputes;\n /** Installments configuration. */\n installments?: Installments;\n /** Refunds configuration. */\n refunds?: Refunds;\n /** Authorize and capture configuration. */\n authCapture?: AuthCapture;\n /** Regular tokenization configuration. */\n regularTokenization?: RegularTokenization;\n /** Custom tokenization configuration. */\n customTokenization?: CustomTokenization;\n /** Next action configuration. */\n nextAction?: NextAction;\n /** Credential-on-File (CoF) configuration. */\n credentialOnFile?: CredentialOnFile;\n /** Mail Order/Telephone Order (MOTO) configuration. */\n moto?: Moto;\n /** Promotional message configuration. */\n promotionalMessages?: PromotionalMessages;\n}\n\nexport interface IFrame {\n /** Whether the next payment action can be shown in an iframe. */\n supported?: boolean;\n}\n\nexport interface NewTab {\n /** Whether the next payment action can be shown in a new tab. */\n supported?: boolean;\n}\n\nexport interface FullPageRedirect {\n /** Whether the next payment action can be shown by redirecting to a new page. */\n supported?: boolean;\n}\n\nexport interface Barcode {\n /** Whether the next payment action can be shown as a barcode to scan. */\n supported?: boolean;\n}\n\nexport interface QrCode {\n /** Whether the next payment action can be shown as a QR code to scan. */\n supported?: boolean;\n}\n\nexport interface ExpressFlow {\n /** Whether this payment method type can be used in an express flow on checkout. */\n supported?: boolean;\n}\n\nexport interface RegularFlow {\n /** Whether this payment method type can be used in a regular flow on checkout. */\n supported?: boolean;\n}\n\nexport interface Disputes {\n /** Whether disputes are supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface Installments {\n /** Whether installments are supported for this payment method type. */\n supported?: boolean;\n /**\n * Max number of installments that can be configured by a provider.\n * @min 2\n * @max 36\n */\n maxInstallmentLimit?: number | null;\n /**\n * Countries for which installments can be enabled.\n * @format COUNTRY\n * @minSize 1\n * @maxSize 200\n */\n allowedCountryCodes?: string[];\n}\n\nexport interface Refunds {\n /** Whether refunds are supported for this payment method type. */\n supported?: boolean;\n /**\n * Maximum period in which payments made using this payment method type can be refunded.\n * @min 1\n * @max 365\n */\n maxRefundabilityPeriodInDays?: number | null;\n}\n\nexport interface AuthCapture {\n /** Whether the authorize and capture flow is supported for this payment method type. */\n supported?: boolean;\n /**\n * Period to wait for the auth capture to be completed before canceling the transaction.\n * @min 1\n * @max 365\n */\n maxCapturePeriodInDays?: number | null;\n}\n\nexport interface RegularTokenization {\n /** Whether the default tokenization mechanism can be configured for this payment method type. */\n supported?: boolean;\n}\n\nexport interface CustomTokenization {\n /** Whether a custom tokenization mechanism can be configured for this payment method type, such as a provider-specific tokenization method. */\n supported?: boolean;\n}\n\nexport interface NextAction {\n /** iframe configuration. */\n iframe?: IFrame;\n /** New tab configuration. */\n newTab?: NewTab;\n /** Full page redirect configuration. */\n fullPageRedirect?: FullPageRedirect;\n /** Barcode configuration. */\n barcode?: Barcode;\n /** QR code configuration. */\n qrCode?: QrCode;\n}\n\nexport interface CredentialOnFile {\n /** Whether the Credential-on-File (CoF) feature is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface Moto {\n /** Whether Mail Order/Telephone Order (MOTO) is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface PromotionalMessages {\n /** Whether promotional messages is supported for this payment method type. */\n supported?: boolean;\n}\n\nexport interface MerchantFlow {\n /**\n * Details about the icons to display for this payment method type on the merchant's Accept Payments page in the site dashboard. Icons are localized according to the locale of the call.\n *\n * Define a locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the method descriptions.\n * @maxSize 200\n */\n icons?: Icon[];\n /**\n * Priority given to this payment method type in the list shown to the merchant.\n * A lower value relative to other payment method types means a higher position on the list.\n * @min 1\n * @max 10000\n */\n priority?: number;\n /** Whether the payment method type is promoted. Promoted payment method types are displayed more prominently on the Accept Payments page. */\n promoted?: boolean;\n /** Whether the merchant cannot choose to accept payments from this payment method type. */\n hidden?: boolean;\n /** Indicates that payment method type is restricted in provided country. */\n countryRestricted?: boolean;\n}\n\n/**\n * Example url:\n * http://images-wixmp-6613fa290e8c1ac70a0297b6.wixmp.com/payment-methods/{domain}/{extension}/{id}.{extension}\n */\nexport interface Icon {\n /** Icon image. */\n image?: string;\n /**\n * Icon tag. Payment method types can have multiple icons, and tags are used to differentiate between them.\n * For example, the UI design for multiple payment method types is upgraded, and now they each have an old icon tagged \"v1\" and a new icon tagged \"v2\". Developers can then easily choose to display all the original \"v1\" style of icons, or all the new \"v2\" style.\n * @minLength 1\n * @maxLength 100\n */\n tag?: string | null;\n /** Icon image format. */\n format?: FormatWithLiterals;\n}\n\nexport enum Format {\n UNKNOWN_FORMAT = 'UNKNOWN_FORMAT',\n SVG = 'SVG',\n PNG = 'PNG',\n}\n\n/** @enumType */\nexport type FormatWithLiterals = Format | 'UNKNOWN_FORMAT' | 'SVG' | 'PNG';\n\nexport interface BuyerFlow {\n /**\n * Details about the icons to display for this payment method type on a site's checkout page. Icons are localized according to the locale of the call.\n *\n * Define a locale by specifying a `country_code` and `language_code` when calling `Get Payment Method Type` or `List Payment Method Types`.\n * For more detailed information, see the method descriptions.\n * @maxSize 200\n */\n icons?: Icon[];\n /**\n * The priority given to this payment method type in the list of payment method types shown to the buyer.\n * A lower value relative to other payment method types means a higher position on the list.\n * @min 1\n * @max 10000\n */\n priority?: number;\n /** Whether the merchant cannot choose to accept payments from this payment method type. */\n hidden?: boolean;\n /** Indicates that payment method type is restricted in provided country. */\n countryRestricted?: boolean;\n /**\n * Minimum payment amount that can be made with this payment method type.\n * If the request omits `currency_code`, the field is not set because its value depends on the currency.\n * @decimalValue options { maxScale:8, gte:0.00 }\n */\n minPaymentAmount?: string | null;\n}\n\nexport interface GetSitePaymentMethodTypeRequest {\n /**\n * Site payment method type ID.\n * @format GUID\n */\n sitePaymentMethodTypeId: string;\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\nexport enum RequestedFields {\n UNKNOWN_REQUESTED_FIELD = 'UNKNOWN_REQUESTED_FIELD',\n ALLOWED_CURRENCIES = 'ALLOWED_CURRENCIES',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELD'\n | 'ALLOWED_CURRENCIES';\n\nexport interface GetSitePaymentMethodTypeResponse {\n /** Requested site payment method type. */\n sitePaymentMethodType?: SitePaymentMethodType;\n}\n\nexport interface ListSitePaymentMethodTypesRequest {\n /**\n * IDs or legacy IDs of site payment method types to retrieve.\n * @maxSize 250\n * @minLength 1\n * @maxLength 50\n */\n ids?: string[];\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to filter payment method types and determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface ListSitePaymentMethodTypesResponse {\n /** List of site payment method types. */\n sitePaymentMethodTypes?: SitePaymentMethodType[];\n}\n\ntype SitePaymentMethodTypeNonNullablePaths =\n | `_id`\n | `features.expressFlow.supported`\n | `features.regularFlow.supported`\n | `features.disputes.supported`\n | `features.installments.supported`\n | `features.installments.allowedCountryCodes`\n | `features.refunds.supported`\n | `features.authCapture.supported`\n | `features.regularTokenization.supported`\n | `features.customTokenization.supported`\n | `features.nextAction.iframe.supported`\n | `features.nextAction.newTab.supported`\n | `features.nextAction.fullPageRedirect.supported`\n | `features.nextAction.barcode.supported`\n | `features.nextAction.qrCode.supported`\n | `features.credentialOnFile.supported`\n | `features.moto.supported`\n | `features.promotionalMessages.supported`\n | `merchantFlow.icons`\n | `merchantFlow.icons.${number}.format`\n | `merchantFlow.priority`\n | `merchantFlow.promoted`\n | `merchantFlow.hidden`\n | `merchantFlow.countryRestricted`\n | `buyerFlow.icons`\n | `buyerFlow.icons.${number}.format`\n | `buyerFlow.priority`\n | `buyerFlow.hidden`\n | `buyerFlow.countryRestricted`\n | `brandOnly`\n | `inPerson`\n | `currencyRestricted`\n | `currencyRestrictionEnabled`\n | `allowedCurrencyCodes`;\n\n/**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * @param sitePaymentMethodTypeId - Site payment method type ID.\n * @public\n * @documentationMaturity preview\n * @requiredField sitePaymentMethodTypeId\n * @permissionId PAYMENTS.SITE_PAYMENT_METHOD_TYPE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Requested site payment method type.\n * @fqn wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.GetSitePaymentMethodType\n */\nexport async function getSitePaymentMethodType(\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n): Promise<\n NonNullablePaths<SitePaymentMethodType, SitePaymentMethodTypeNonNullablePaths>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n sitePaymentMethodTypeId: sitePaymentMethodTypeId,\n languageCode: options?.languageCode,\n countryCode: options?.countryCode,\n currencyCode: options?.currencyCode,\n requestedFields: options?.requestedFields,\n });\n\n const reqOpts =\n ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType.getSitePaymentMethodType(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'sitePaymentMethodType.merchantFlow.icons.image' },\n { path: 'sitePaymentMethodType.buyerFlow.icons.image' },\n ],\n },\n ])\n )?.sitePaymentMethodType!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n sitePaymentMethodTypeId: '$[0]',\n languageCode: '$[1].languageCode',\n countryCode: '$[1].countryCode',\n currencyCode: '$[1].currencyCode',\n requestedFields: '$[1].requestedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['sitePaymentMethodTypeId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSitePaymentMethodTypeOptions {\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n\n/**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n * @public\n * @documentationMaturity preview\n * @permissionId PAYMENTS.SITE_PAYMENT_METHOD_TYPE_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.ListSitePaymentMethodTypes\n */\nexport async function listSitePaymentMethodTypes(\n options?: ListSitePaymentMethodTypesOptions\n): Promise<\n NonNullablePaths<\n ListSitePaymentMethodTypesResponse,\n {\n [P in SitePaymentMethodTypeNonNullablePaths]: `sitePaymentMethodTypes.${number}.${P}`;\n }[SitePaymentMethodTypeNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n ids: options?.ids,\n languageCode: options?.languageCode,\n countryCode: options?.countryCode,\n currencyCode: options?.currencyCode,\n requestedFields: options?.requestedFields,\n });\n\n const reqOpts =\n ambassadorWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodType.listSitePaymentMethodTypes(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'sitePaymentMethodTypes.merchantFlow.icons.image' },\n { path: 'sitePaymentMethodTypes.buyerFlow.icons.image' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n ids: '$[0].ids',\n languageCode: '$[0].languageCode',\n countryCode: '$[0].countryCode',\n currencyCode: '$[0].currencyCode',\n requestedFields: '$[0].requestedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListSitePaymentMethodTypesOptions {\n /**\n * IDs or legacy IDs of site payment method types to retrieve.\n * @maxSize 250\n * @minLength 1\n * @maxLength 50\n */\n ids?: string[];\n /**\n * Language used to determine localized values for fields in the response.\n *\n * Must be a 2-letter language code in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Country used to filter payment method types and determine localized values for fields in the response.\n *\n * Must be a 2-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#officially_assigned_code_elements) format.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Currency used to determine localized values for fields in the response.\n *\n * Must be a 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.\n * @format CURRENCY\n */\n currencyCode?: string | null;\n /**\n * Requested additional fields\n * @maxSize 2\n */\n requestedFields?: RequestedFieldsWithLiterals[];\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/payment-method-types',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/payments/site-payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'cashier-services._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'events._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'events.wixapps.net': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'invoices._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'pricing-plans.wixapps.net': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'vod-server._base_domain_': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'www.wixhotels.com': [\n {\n srcPath: '/_api/payment-method-types',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'tpa.wixapps.net': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/payments/payment-method-types',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath:\n '/payments/site-payment-method-types/v1/site-payment-method-types',\n destPath: '/v1/site-payment-method-types',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath:\n '/payments/site-payment-method-types/v1/site-payment-method-types',\n destPath: '/v1/site-payment-method-types',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_payments_site-payment-method-types';\n\n/**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n */\nexport function getSitePaymentMethodType(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSitePaymentMethodType({ host }: any) {\n const metadata = {\n entityFqdn:\n 'wix.payments.site_payment_method_types.v1.site_payment_method_type',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.GetSitePaymentMethodType',\n packageName: PACKAGE_NAME,\n url: resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n {\n protoPath: '/v1/site-payment-method-types/{sitePaymentMethodTypeId}',\n data: payload,\n host,\n }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getSitePaymentMethodType;\n}\n\n/**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n */\nexport function listSitePaymentMethodTypes(\n payload: object\n): RequestOptionsFactory<any> {\n function __listSitePaymentMethodTypes({ host }: any) {\n const metadata = {\n entityFqdn:\n 'wix.payments.site_payment_method_types.v1.site_payment_method_type',\n method: 'GET' as any,\n methodFqn:\n 'wix.payments.site_payment_method_types.v1.SitePaymentMethodTypeService.ListSitePaymentMethodTypes',\n packageName: PACKAGE_NAME,\n url: resolveWixPaymentsSitePaymentMethodTypesV1SitePaymentMethodTypeServiceUrl(\n { protoPath: '/v1/site-payment-method-types', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSitePaymentMethodTypes;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetSitePaymentMethodTypeOptions,\n ListSitePaymentMethodTypesOptions,\n ListSitePaymentMethodTypesResponse,\n SitePaymentMethodType,\n getSitePaymentMethodType as universalGetSitePaymentMethodType,\n listSitePaymentMethodTypes as universalListSitePaymentMethodTypes,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/payments' };\n\ntype SitePaymentMethodTypeNonNullablePaths =\n | `_id`\n | `features.expressFlow.supported`\n | `features.regularFlow.supported`\n | `features.disputes.supported`\n | `features.installments.supported`\n | `features.installments.allowedCountryCodes`\n | `features.refunds.supported`\n | `features.authCapture.supported`\n | `features.regularTokenization.supported`\n | `features.customTokenization.supported`\n | `features.nextAction.iframe.supported`\n | `features.nextAction.newTab.supported`\n | `features.nextAction.fullPageRedirect.supported`\n | `features.nextAction.barcode.supported`\n | `features.nextAction.qrCode.supported`\n | `features.credentialOnFile.supported`\n | `features.moto.supported`\n | `features.promotionalMessages.supported`\n | `merchantFlow.icons`\n | `merchantFlow.icons.${number}.format`\n | `merchantFlow.priority`\n | `merchantFlow.promoted`\n | `merchantFlow.hidden`\n | `merchantFlow.countryRestricted`\n | `buyerFlow.icons`\n | `buyerFlow.icons.${number}.format`\n | `buyerFlow.priority`\n | `buyerFlow.hidden`\n | `buyerFlow.countryRestricted`\n | `brandOnly`\n | `inPerson`\n | `currencyRestricted`\n | `currencyRestrictionEnabled`\n | `allowedCurrencyCodes`;\n\nexport function getSitePaymentMethodType(\n httpClient: HttpClient\n): GetSitePaymentMethodTypeSignature {\n return (\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n ) =>\n universalGetSitePaymentMethodType(\n sitePaymentMethodTypeId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetSitePaymentMethodTypeSignature {\n /**\n * Retrieves a payment method type, with some fields localized according to the caller's language and country.\n *\n * The callers language and country are taken from the `language` or `country` parameters in the request.\n * If these parameters are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * @param - Site payment method type ID.\n * @returns Requested site payment method type.\n */\n (\n sitePaymentMethodTypeId: string,\n options?: GetSitePaymentMethodTypeOptions\n ): Promise<\n NonNullablePaths<\n SitePaymentMethodType,\n SitePaymentMethodTypeNonNullablePaths\n >\n >;\n}\n\nexport function listSitePaymentMethodTypes(\n httpClient: HttpClient\n): ListSitePaymentMethodTypesSignature {\n return (options?: ListSitePaymentMethodTypesOptions) =>\n universalListSitePaymentMethodTypes(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListSitePaymentMethodTypesSignature {\n /**\n * Retrieves a list of payment method types.\n *\n * If an `ids` array is specified, only payment method types with matching IDs or legacy IDs are returned.\n * If no `ids` are specified, all payment method types available in the caller's country are returned, with some fields localized according to the caller's language and country.\n *\n * The caller's language and country are taken from the `language` or `country` parameters in the request.\n * If `language` or `country` are not specified, the values are taken from context of the call if possible. For example, if this method is called from a Wix site, the selected language on that site will be used.\n * If language or country can't be determined, the method doesn't perform any filtering or localization.\n *\n * Language and country are used to determine localized values for the `displayName`, `description` fields.\n * Country is used to determine localized values for the `priority` and `promoted` fields in both `merchantFlow` and `buyerFlow`.\n * `currency` is used to determine the eligibility of payment method types for the provided currency.\n */\n (options?: ListSitePaymentMethodTypesOptions): Promise<\n NonNullablePaths<\n ListSitePaymentMethodTypesResponse,\n {\n [P in SitePaymentMethodTypeNonNullablePaths]: `sitePaymentMethodTypes.${number}.${P}`;\n }[SitePaymentMethodTypeNonNullablePaths]\n >\n >;\n}\n\nexport {\n AuthCapture,\n Barcode,\n BuyerFlow,\n CredentialOnFile,\n CustomTokenization,\n Disputes,\n ExpressFlow,\n Features,\n Format,\n FullPageRedirect,\n GetSitePaymentMethodTypeOptions,\n GetSitePaymentMethodTypeRequest,\n GetSitePaymentMethodTypeResponse,\n IFrame,\n Icon,\n Installments,\n ListSitePaymentMethodTypesOptions,\n ListSitePaymentMethodTypesRequest,\n ListSitePaymentMethodTypesResponse,\n MerchantFlow,\n Moto,\n NewTab,\n NextAction,\n PromotionalMessages,\n QrCode,\n Refunds,\n RegularFlow,\n RegularTokenization,\n RequestedFields,\n SitePaymentMethodType,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n","import {\n getSitePaymentMethodType as publicGetSitePaymentMethodType,\n listSitePaymentMethodTypes as publicListSitePaymentMethodTypes,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getSitePaymentMethodType: MaybeContext<\n BuildRESTFunction<typeof publicGetSitePaymentMethodType> &\n typeof publicGetSitePaymentMethodType\n> = /*#__PURE__*/ createRESTModule(publicGetSitePaymentMethodType);\nexport const listSitePaymentMethodTypes: MaybeContext<\n BuildRESTFunction<typeof publicListSitePaymentMethodTypes> &\n typeof publicListSitePaymentMethodTypes\n> = /*#__PURE__*/ createRESTModule(publicListSitePaymentMethodTypes);\n\nexport {\n Format,\n RequestedFields,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\nexport {\n SitePaymentMethodType,\n Features,\n IFrame,\n NewTab,\n FullPageRedirect,\n Barcode,\n QrCode,\n ExpressFlow,\n RegularFlow,\n Disputes,\n Installments,\n Refunds,\n AuthCapture,\n RegularTokenization,\n CustomTokenization,\n NextAction,\n CredentialOnFile,\n Moto,\n PromotionalMessages,\n MerchantFlow,\n Icon,\n BuyerFlow,\n GetSitePaymentMethodTypeRequest,\n GetSitePaymentMethodTypeResponse,\n ListSitePaymentMethodTypesRequest,\n ListSitePaymentMethodTypesResponse,\n GetSitePaymentMethodTypeOptions,\n ListSitePaymentMethodTypesOptions,\n} from './payments-site-payment-method-types-v1-site-payment-method-type-site-payment-method-types.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,0EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,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AA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA0BO,SAASC,4BACd,YACqC;AACrC,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC5FA,SAAS,wBAAwB;AAG1B,IAAMC,4BAGK,iCAAiBA,yBAA8B;AAC1D,IAAMC,8BAGK,iCAAiBA,2BAAgC;","names":["Format","RequestedFields","getSitePaymentMethodType","listSitePaymentMethodTypes","getSitePaymentMethodType","listSitePaymentMethodTypes","getSitePaymentMethodType","listSitePaymentMethodTypes"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto_sdk_payments_site-payment-method-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
|
+
"license": "MIT",
|
|
4
5
|
"publishConfig": {
|
|
5
6
|
"registry": "https://registry.npmjs.org/",
|
|
6
7
|
"access": "public"
|
|
@@ -49,5 +50,5 @@
|
|
|
49
50
|
"fqdn": "wix.payments.site_payment_method_types.v1.site_payment_method_type"
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
|
-
"falconPackageHash": "
|
|
53
|
+
"falconPackageHash": "7abc8190ec96c6455644c1f088b3dc37a3e2f95e0dd253dcb121ce61"
|
|
53
54
|
}
|