File

projects/congarevenuecloud/elements/src/lib/alert/services/alert.service.ts

Description

Service is responsible to fetch the erros on cart Revalidation to show on alerts

Index

Properties
Methods

Constructor

constructor(cartService: CartService, productConfigurationService: ProductConfigurationService, revalidateCartService: RevalidateCartService)
Parameters :
Name Type Optional
cartService CartService No
productConfigurationService ProductConfigurationService No
revalidateCartService RevalidateCartService No

Methods

abandonCart
abandonCart()

An attempt to abandon the cart is made.

Returns : Observable<Cart>
cartReprice
cartReprice()

An attempt to price cart is made.

Returns : Observable<Cart>
cloneCart
cloneCart()

An attempt to clone the cart is made.

Returns : Observable<Cart>
closeError
closeError(view: Views)

To close the alert

Parameters :
Name Type Optional
view Views No
Returns : void
createCart
createCart()

Creates new cart and set it as active.

Returns : Observable<Cart>
getAlerts
getAlerts(views: Array, record: AObject)

Method responsible to get the alerts on component initialization for cart, revalidations, isDiscovery.

Parameters :
Name Type Optional Default value Description
views Array<Views> No []

List of alert messages

record AObject No

is instance of an Aobject, to fetch error for

Returns : Observable<Array<Views>>

an Oservable of active alert messages

getCartRecord
getCartRecord()

Method responsible to get the alerts on cart errors

Returns : Observable<Cart>

an Observable of active cart alert messages

getContinue
getContinue()

An attempt to wait for the pricing to be completed

Returns : void
openRevalidateCartModal
openRevalidateCartModal()

Open revalidate cart modal popup

Returns : void

Properties

pendingSubject
Type : BehaviorSubject<Array<Views>>
Default value : new BehaviorSubject<Array<Views>>([])

results matching ""

    No results matching ""