File

feature-libs/checkout/core/connectors/cost-center/checkout-cost-center.connector.ts

Index

Methods

Constructor

constructor(adapter: CheckoutCostCenterAdapter)
Parameters :
Name Type Optional
adapter CheckoutCostCenterAdapter No

Methods

setCostCenter
setCostCenter(userId: string, cartId: string, costCenterId: string)
Parameters :
Name Type Optional
userId string No
cartId string No
costCenterId string No
Returns : Observable<Cart>
import { Injectable } from '@angular/core';
import { Cart } from '@spartacus/core';
import { Observable } from 'rxjs';
import { CheckoutCostCenterAdapter } from './checkout-cost-center.adapter';

@Injectable()
export class CheckoutCostCenterConnector {
  constructor(protected adapter: CheckoutCostCenterAdapter) {}

  setCostCenter(
    userId: string,
    cartId: string,
    costCenterId: string
  ): Observable<Cart> {
    return this.adapter.setCostCenter(userId, cartId, costCenterId);
  }
}

result-matching ""

    No results matching ""