Class: EcomFSXAProxyApi
Extends FSXAProxyApi with custom ecommerce methods
Hierarchy
FSXAProxyApi
↳ EcomFSXAProxyApi
Constructors
constructor
new EcomFSXAProxyApi(baseUrl
, logLevel?
, filterOptions?
)
Parameters
Name | Type |
---|---|
baseUrl |
string |
logLevel? |
LogLevel |
filterOptions? |
ProxyApiFilterOptions |
Overrides
FSXAProxyApi.constructor
Defined in
core/api/ecomFSXAProxyApi.ts:17
Properties
defaultLocale
defaultLocale: string
= 'en_GB'
Defined in
core/api/ecomFSXAProxyApi.ts:12
Methods
createPage
createPage(payload
): Promise
<boolean
| void
>
Creates a FirstSpirit page according to shop identifiers.
Parameters
Name | Type | Description |
---|---|---|
payload |
CreatePagePayload |
Payload to use when creating the page. |
Returns
Promise
<boolean
| void
>
Whether the page was created.
Defined in
core/api/ecomFSXAProxyApi.ts:73
findPage
findPage(__namedParameters
): Promise
<object
>
Find a page with FSXA Query by ecommerce store ID
Parameters
Name | Type |
---|---|
__namedParameters |
FindPageParams |
Returns
Promise
<object
>
Defined in
core/api/ecomFSXAProxyApi.ts:39
getTppInstance
getTppInstance(): Promise
<null
| TPPWrapperInterface
>
Returns the TPP instance. Will wait for TPP to be loaded before returning the value. Will return null if TPP was not provided.
Returns
Promise
<null
| TPPWrapperInterface
>
Defined in
core/api/ecomFSXAProxyApi.ts:98
logIAmAlive
logIAmAlive(): Promise
<void
>
Returns
Promise
<void
>
Defined in
core/api/ecomFSXAProxyApi.ts:62
setDefaultLocale
setDefaultLocale(locale
): EcomFSXAProxyApi
Setting the default locale using builder pattern
Parameters
Name | Type |
---|---|
locale |
string |
Returns
Defined in
core/api/ecomFSXAProxyApi.ts:122
setTPPWrapper
Protected
setTPPWrapper(tpp
): void
Sets the TPPWrapper instance.
Parameters
Name | Type | Description |
---|---|---|
tpp |
TPPWrapperInterface |
The instance to set. |
Returns
void
Defined in
core/api/ecomFSXAProxyApi.ts:133