# Class: HybrisConnector

## @mobify/commerce-integrations/dist/connectors/hybris.HybrisConnector()

A Commerce Integrations connector for SAP Hybris Commerce backends.

## Constructor

#### new HybrisConnector()

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.ParserHooks
Source:
  - connectors/hybris.js, line 21

### Methods

#### addCartItem(cart, cartItem, opts) → {Promise.<module:@mobify/commerce-integrations/dist/types.Cart>}

Adds a cart item to cart.

##### Parameters:

Name | Type | Description
--- | --- | ---
`cart` | module:@mobify/commerce-integrations/dist/types.Cart | The cart to add the cart item to.
`cartItem` | module:@mobify/commerce-integrations/dist/types.CartItem | The cart item to add.
`opts` | Object |

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#addCartItem
Source:
  - connectors/interfaces.js, line 219

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Cart>

#### addCouponEntry(cart, couponEntry, opts) → {Promise.<module:@mobify/commerce-integrations/dist/types.Cart>}

Add a coupon to the cart by it's code.

##### Parameters:

Name | Type | Description
--- | --- | ---
`cart` | module:@mobify/commerce-integrations/dist/types.Cart | The customer's cart.
`couponEntry` | Object | The coupon.
`opts` | Object | Options object.

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#addCouponEntry
Source:
  - connectors/interfaces.js, line 367

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Cart>

#### createCart(oldCcart, optsopt) → {Promise.<module:@mobify/commerce-integrations/dist/types.Cart>}

Creates a new cart with an optional cart object.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`oldCcart` | module:@mobify/commerce-integrations/dist/types.Cart |  | The cart you'd like to migrate to the new cart
`opts` | Object | <optional> | object

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#createCart
Source:
  - connectors/interfaces.js, line 185

##### Throws:

Could not create cart.

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Cart>

#### createOrder(cart, opts) → {Promise.<module:@mobify/commerce-integrations/dist/types.Order>}

Create a new order using a given cart.

##### Parameters:

Name | Type | Description
--- | --- | ---
`cart` | module:@mobify/commerce-integrations/dist/types.Cart | The customer's cart.
`opts` | Object |

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#createOrder
Source:
  - connectors/interfaces.js, line 326

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Order>

#### deleteCart(cartId, optsopt)

Deletes the given cart

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`cartId` | String |  | The id of the cart you want to delete.
`opts` | Object | <optional> | object

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#deleteCart
Source:
  - connectors/interfaces.js, line 208

##### Throws:

Could not delete cart.

#### getAuthentications() → {Object}

Get the current authentications object, which can be used to save and restore auth state.

Source:
  - connectors/hybris.js, line 166

##### Returns:

Type
  Object

#### getCart(cartId, optsopt) → {Promise.<module:@mobify/commerce-integrations/dist/types.Cart>}

Retrieve cart by id.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`cartId` | String |  | The id of the cart you want to retrieve
`opts` | Object | <optional> | object

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#getCart
Source:
  - connectors/interfaces.js, line 196

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Cart>

#### getCategories(ids, optsopt) → {Promise.<module:@mobify/commerce-integrations/dist/types.CategoryList>}

Returns multiple product Categories by their ids.

On supported backends this method will retrieve Categories in a single network call. Others may make a call per id to emulate the same behaviour.

Invalid ids are ignored and results are not guaranteed to be returned in the order requested.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`ids` | Array.<string> |  |
`opts` | Object | <optional> | object

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#getCategories
Source:
  - connectors/interfaces.js, line 161

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.CategoryList>

#### getCategory(id, optsopt) → {Promise.<module:@mobify/commerce-integrations/dist/types.Category>}

Get a product Category by id.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`id` | String |  |
`opts` | Object | <optional> | object

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#getCategory
Source:
  - connectors/interfaces.js, line 144

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Category>

#### getCustomer(id, optsopt) → {Promise.<module:@mobify/commerce-integrations/dist/types.Customer>}

Return a customer's details by id.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`id` | String |  | Customer Id
`opts` | Object | <optional> | Options object

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#getCustomer
Source:
  - connectors/interfaces.js, line 81

##### Throws:

Throw generic error if server has error.

Type
  module:@mobify/commerce-integrations/dist/errors.ServerError

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Customer>

#### getDefaultHeaders() → {Object.<String, String>}

Get the default headers that are sent with every request.

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#getDefaultHeaders
Source:
  - connectors/interfaces.js, line 20

##### Returns:

Type
  Object.<String, String>

#### getOrder(id, optsopt) → {Promise.<module:@mobify/commerce-integrations/dist/types.Order>}

Get a single order by id.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`id` | String |  | The order id.
`opts` | Object | <optional> | Options object

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#getOrder
Source:
  - connectors/interfaces.js, line 337

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Order>

#### getOrders(ids, optsopt) → {Promise.<module:@mobify/commerce-integrations/dist/types.OrderList>}

Get multiple orders by their ids.

On supported backends this method will retrieve orders in a single network call. Others may make a call per id to emulate the same behaviour.

Invalid ids are ignored and results are not guaranteed to be returned in the order requested.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`ids` | Array.<String> |  | The order ids.
`opts` | Object | <optional> | Options object

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#getOrders
Source:
  - connectors/interfaces.js, line 354

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.OrderList>

#### getPaymentMethods(cart, opts) → {Promise.<Array.module:@mobify/commerce-integrations/dist/types.PaymentMethod>}

Get the available payment methods for the cart

##### Parameters:

Name | Type | Description
--- | --- | ---
`cart` | module:@mobify/commerce-integrations/dist/types.Cart | The customer's cart
`opts` | Object |

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#getPaymentMethods
Source:
  - connectors/hybris.js, line 1444

##### Returns:

Hybris only supports payments by credit card attained from their cardtypes endpoint so this command will return only one payment method with the id 'CREDIT_CARD', name 'Credit Card' and all of it's valid credit card types.

Type
  Promise.<Array.module:@mobify/commerce-integrations/dist/types.PaymentMethod>

#### getProduct(id, optsopt) → {Promise.<module:@mobify/commerce-integrations/dist/types.Product>}

Get a single product by id.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`id` | String |  | The product id.
`opts` | Object | <optional> | Options object

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#getProduct
Source:
  - connectors/interfaces.js, line 103

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Product>

#### getProducts(ids, optsopt) → {Promise.<module:@mobify/commerce-integrations/dist/types.ProductList>}

Get multiple products by their ids.

On supported backends this method will retrieve products in a single network call. Others may make a call per id to emulate the same behaviour.

Invalid ids are ignored and results are not guaranteed to be returned in the order requested.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`ids` | Array.<String> |  | The product ids.
`opts` | Object | <optional> | Options object

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#getProducts
Source:
  - connectors/interfaces.js, line 120

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.ProductList>

#### getShippingMethods(cart, opts) → {Promise.<Array.<module:@mobify/commerce-integrations/dist/types.ShippingMethod>>}

Get all the available shipping methods given the cart details.

##### Parameters:

Name | Type | Description
--- | --- | ---
`cart` | module:@mobify/commerce-integrations/dist/types.Cart | The cart to determinen avaialble shipping methods for.
`opts` | Object |

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#getShippingMethods
Source:
  - connectors/interfaces.js, line 284

##### Returns:

Type
  Promise.<Array.<module:@mobify/commerce-integrations/dist/types.ShippingMethod>>

#### getStore(id, optsopt) → {Promise.<module:@mobify/commerce-integrations/dist/types.Store>}

Get a Store (ie. a physical retail-outlet) by id. Includes addresses, opening hours, etc.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`id` | String |  | The id of the store
`opts` | Object | <optional> | Options object

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#getStore
Source:
  - connectors/interfaces.js, line 133

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Store>

#### login(username, password) → {Promise.<module:@mobify/commerce-integrations/dist/types.Customer>}

Log a customer in and return their details.

On backends which support "guest login", credentials can be omitted to give you a guest session.

##### Parameters:

Name | Type | Description
--- | --- | ---
`username` | String |
`password` | String |

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#login
Source:
  - connectors/interfaces.js, line 46

##### Throws:

- Will throw an error if the username or password aren't provided for type registered.

  Type
    module:@mobify/commerce-integrations/dist/errors.InvalidArgumentError

- Will throw an error if the customer credentials are incorrect.

  Type
    module:@mobify/commerce-integrations/dist/errors.ForbiddenError

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Customer>

#### logout() → {Promise.<undefined>}

Log a customer out.

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#logout
Source:
  - connectors/interfaces.js, line 57

##### Throws:

Will throw an error if there was a server-side error.

Type
  module:@mobify/commerce-integrations/dist/errors.ServerError

##### Returns:

Type
  Promise.<undefined>

#### parseCart()

Parse a cart

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.ParserHooks#parseCart
Source:
  - connectors/interfaces.js, line 455

#### parseCartItem()

Parse a cart item

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.ParserHooks#parseCartItem
Source:
  - connectors/interfaces.js, line 462

#### parseCategories()

Parse categories.

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.ParserHooks#parseCategories
Source:
  - connectors/interfaces.js, line 413

#### parseCategory(categories) → {Promise.<module:@mobify/commerce-integrations/dist/types.Category>}

Takes an OCC API Category objects and parses it into an commerce-integrations Category type.

##### Parameters:

Name | Type | Description
--- | --- | ---
`categories` | Array.<Object> | An OCC API Category document

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.ParserHooks#parseCategory
Source:
  - connectors/hybris.js, line 378

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Category>

#### parseCouponEntry()

Parse a coupon item

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.ParserHooks#parseCouponEntry
Source:
  - connectors/hybris.js, line 837

#### parseCustomer()

Parse a customer.

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.ParserHooks#parseCustomer
Source:
  - connectors/interfaces.js, line 399

#### parseGetStore(data) → {Promise.<module:@mobify/commerce-integrations/dist/types.Store>}

Takes an OCC API PointOfService object and parses it into a commerce-integrations Store type.

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | Object | An OCC API PointOfService document

Source:
  - connectors/hybris.js, line 662

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Store>

#### parseOpeningHours(hours) → {Promise.<module:@mobify/commerce-integrations/dist/types.Store.hours>}

Takes an OCC API WeekdayOpeningDay object and parses it into a commerce-integrations Store.hours type.

##### Parameters:

Name | Type | Description
--- | --- | ---
`hours` | Object | An OCC API WeekdayOpneningDay document

Source:
  - connectors/hybris.js, line 644

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Store.hours>

#### parseOrder()

Parse an order.

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.ParserHooks#parseOrder
Source:
  - connectors/interfaces.js, line 504

#### parseOrderAddress()

Parse an order address

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.ParserHooks#parseOrderAddress
Source:
  - connectors/interfaces.js, line 469

#### parsePayment()

Parse a payment.

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.ParserHooks#parsePayment
Source:
  - connectors/interfaces.js, line 490

#### parsePaymentMethod()

Parse a payment method.

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.ParserHooks#parsePaymentMethod
Source:
  - connectors/interfaces.js, line 497

#### parseProduct()

Parse a product.

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.ParserHooks#parseProduct
Source:
  - connectors/interfaces.js, line 427

#### parseSearchProducts()

Parse a product search result.

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.ParserHooks#parseSearchProducts
Source:
  - connectors/interfaces.js, line 420

#### parseSearchStores()

Parse a StoreSearchResult

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.ParserHooks#parseSearchStores
Source:
  - connectors/interfaces.js, line 448

#### parseShippingMethod()

Parse a shipping method

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.ParserHooks#parseShippingMethod
Source:
  - connectors/interfaces.js, line 483

#### refreshSession() → {Promise.<module:@mobify/commerce-integrations/dist/types.Customer>}

Refresh a session token, on backends that support refresh.

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#refreshSession
Source:
  - connectors/interfaces.js, line 68

##### Throws:

Will throw an error if authorization credentials are incorrect

Type
  module:@mobify/commerce-integrations/dist/errors.ForbiddenError

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Customer>

#### registerCustomer(data) → {Promise.<module:@mobify/commerce-integrations/dist/types.Customer>}

Register a new customer account and login.

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | module:@mobify/commerce-integrations/dist/types.HybrisCustomerRegistration |

Source:
  - connectors/hybris.js, line 48

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Customer>

#### removeCartItem(cart, cartItemId, opts) → {Promise.<module:@mobify/commerce-integrations/dist/types.Cart>}

Remove a cart item from the cart.

##### Parameters:

Name | Type | Description
--- | --- | ---
`cart` | module:@mobify/commerce-integrations/dist/types.Cart | The cart to remove the cart item from.
`cartItemId` | String | The id of the cart item to remove.
`opts` | Object |

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#removeCartItem
Source:
  - connectors/interfaces.js, line 230

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Cart>

#### removeCouponEntry(cart, couponEntryId, opts) → {Promise.<module:@mobify/commerce-integrations/dist/types.Cart>}

Removes a coupon from the cart by its coupon entry id.

##### Parameters:

Name | Type | Description
--- | --- | ---
`cart` | module:@mobify/commerce-integrations/dist/types.Cart | The customer's cart.
`couponEntryId` | Object | The coupon entry id.
`opts` | Object | Options object.

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#removeCouponEntry
Source:
  - connectors/interfaces.js, line 380

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Cart>

#### searchProducts(productSearchRequest, optsopt) → {Promise.<module:@mobify/commerce-integrations/dist/types.ProductSearch>}

Search for products, given a productSearchRequest object.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`productSearchRequest` | module:@mobify/commerce-integrations/dist/types.ProductSearchRequest |  | Search query
`opts` | Object | <optional> | Options object

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#searchProducts
Source:
  - connectors/interfaces.js, line 92

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.ProductSearch>

#### searchStores(storeSearchRequest, optsopt) → {Promise.<module:@mobify/commerce-integrations/dist/types.StoreSearchResult>}

Searches for Stores (ie. physical retail-outlets).

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`storeSearchRequest` | module:@mobify/commerce-integrations/dist/types.StoreSearchRequest |  |
`opts` | Object | <optional> | Options object

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#searchStores
Source:
  - connectors/interfaces.js, line 172

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.StoreSearchResult>

#### setAuthentications(authentications)

Set the current authentications object, as returned from getAuthentications. Use to save and restore auth state.

##### Parameters:

Name | Type | Description
--- | --- | ---
`authentications` | Object |

Source:
  - connectors/hybris.js, line 176

#### setBillingAddress(cart, billingAddress, opts) → {Promise.<module:@mobify/commerce-integrations/dist/types.Cart>}

Set the billing address on the cart.

Billing Address model : this order address needs to have a titleCode defined. The default titleCodes are: ['mr', 'ms', 'miss', 'mrs', 'dr', 'rev'] But these may change depending on your backend, please refer to your backend instance to confirm valid titleCodes.

If the billing address is set before adding a payment, the billing address will not yet be saved in the hybris instance. Instead, the billing address will be saved in the hybris instance upon setting a payment.

##### Parameters:

Name | Type | Description
--- | --- | ---
`cart` | module:@mobify/commerce-integrations/dist/types.Cart | The cart to update the billing address for
`billingAddress` | module:@mobify/commerce-integrations/dist/types.OrderAddress | The new or modified address
`opts` | Object |

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#setBillingAddress
Source:
  - connectors/hybris.js, line 1292

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Cart>

#### setCustomerInformation(cart, customerInformation, opts) → {Promise.<module:@mobify/commerce-integrations/dist/types.Cart>}

Set the customer information.

##### Parameters:

Name | Type | Description
--- | --- | ---
`cart` | module:@mobify/commerce-integrations/dist/types.Cart | The customer's cart
`customerInformation` | module:@mobify/commerce-integrations/dist/types.CustomerInformation | The new or modified customer information
`opts` | Object |

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#setCustomerInformation
Source:
  - connectors/hybris.js, line 1218

##### Returns:

Email can be set for a guest user but not a registered user.

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Cart>

#### setDefaultHeaders(headers)

Set the default headers that are sent with every request.

##### Parameters:

Name | Type | Description
--- | --- | ---
`headers` | Object.<String, String> |

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#setDefaultHeaders
Source:
  - connectors/interfaces.js, line 29

#### setPayment(cart, payment, opts) → {Promise.<module:@mobify/commerce-integrations/dist/types.Cart>}

Add a supported payment type to the cart

##### Parameters:

Name | Type | Description
--- | --- | ---
`cart` | module:@mobify/commerce-integrations/dist/types.Cart | The cart to add the payment to
`payment` | module:@mobify/commerce-integrations/dist/types.Payment | The payment to add
`opts` | Object |

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#setPayment
Source:
  - connectors/hybris.js, line 1155

##### Returns:

Need to set a billing address before setting a payment. Must call setCustomerInformation() to add an email before setting payment for an anonymous cart.user. cart.paymentDetails.number will be returned as undefined and set as a masked number in cart.paymentDetails.maskedNumber.

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Cart>

#### setShippingAddress(cart, shippingMethod, opts) → {Promise.<module:@mobify/commerce-integrations/dist/types.Cart>}

Set the shipping method for the cart.

##### Parameters:

Name | Type | Description
--- | --- | ---
`cart` | module:@mobify/commerce-integrations/dist/types.Cart | The cart to set the shipping method for
`shippingMethod` | module:@mobify/commerce-integrations/dist/types.ShippingMethod | The shipping method to setid
`opts` | Object |

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#setShippingAddress
Source:
  - connectors/hybris.js, line 1370

##### Returns:

Must call setCustomerInformation() to add an email before setting payment for a guest user.

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Cart>

#### setShippingMethod(cart, shippingMethod, opts) → {Promise.<module:@mobify/commerce-integrations/dist/types.Cart>}

Set the shipping method for the cart.

##### Parameters:

Name | Type | Description
--- | --- | ---
`cart` | module:@mobify/commerce-integrations/dist/types.Cart | The cart to set the shipping method for.
`shippingMethod` | module:@mobify/commerce-integrations/dist/types.ShippingMethod | The shipping method to set.
`opts` | Object |

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#setShippingMethod
Source:
  - connectors/interfaces.js, line 295

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Cart>

#### transformCartItem()

Transform a cartItem into hybris' model OrderEntryOCC.

Source:
  - connectors/hybris.js, line 1007

#### transformOrderAddress()

Transform an orderAddress into hybris' models: billingAddress or shippingAddress

Source:
  - connectors/hybris.js, line 973

#### transformPayment()

Transform a payment into hybris' model paymentDetail.

Source:
  - connectors/hybris.js, line 1019

#### transformShippingMethod()

Transform a shippingMethod into hybris' model deliveryMethod.

Source:
  - connectors/hybris.js, line 996

#### updateCartItem(cart, cartItem, opts) → {Promise.<module:@mobify/commerce-integrations/dist/types.Cart>}

Update an existing cart item in the cart.

##### Parameters:

Name | Type | Description
--- | --- | ---
`cart` | module:@mobify/commerce-integrations/dist/types.Cart | The cart to containing the cart item to update.
`cartItem` | module:@mobify/commerce-integrations/dist/types.CartItem | The cart item to update.
`opts` | Object |

Implements:
  - module:@mobify/commerce-integrations/dist/connectors/interfaces.CommerceConnector#updateCartItem
Source:
  - connectors/interfaces.js, line 241

##### Returns:

Type
  Promise.<module:@mobify/commerce-integrations/dist/types.Cart>