> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mastermindcms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ShoppingCartServiceImpl

> Aufruf öffentlicher Servicemethoden über die REST API: shoppingCartServiceImpl

<ResponseField name="beanId" type="string">
  Die Spring-Bean-ID des aufzurufenden Services.

  shoppingCartServiceImpl
</ResponseField>

<ResponseField name="scope" type="string" default="PROTOTYPE">
  Bean-Scope. Für Serviceaufrufe wird PROTOTYPE verwendet.
</ResponseField>

<ResponseField name="functionName" type="string">
  Der öffentliche Methodenname des Services, der in der Signatur angegeben ist.
</ResponseField>

<ResponseField name="args" type="object[]">
  Das Argument-Array der Methode. Jedes Argument wird mit dem Index 0, 1 usw. übergeben; der Wert muss dem Java-Parametertyp entsprechen.
</ResponseField>

## Headers

```http theme={null}
POST /api/v1/bean/request
Content-Type: application/json
Lang-Context: de
Site-Context: my-site
Authorization: Bearer <token>
```

Senden Sie `Lang-Context` und `Site-Context` mit jeder Anfrage. Für geschützte Methoden senden Sie das JWT im Header `Authorization` im Format `Bearer <token>`.

**Zugriff:** ADMIN. **Bearer Token:** bedingt für USER/ADMIN.

* GUEST — nicht angemeldete Benutzer; nur Whitelist-Services sind verfügbar.
* USER — Authentifizierung erforderlich; Methoden mit USER-Prüfung sind verfügbar.
* ADMIN — vollständiger Zugriff auf öffentliche Methoden aller Services.
* Wenn eine Methode intern eine Rolle prüft, kann GUEST null erhalten.

## Methoden

<ResponseField name="getCartDTO" type="ShoppingCartDTO">
  | Argument | Typ | Beschreibung                              |
  | -------- | --- | ----------------------------------------- |
  | —        | —   | Diese Methode akzeptiert keine Argumente. |

  ### getCartDTO

  ```json theme={null}
  {
    "beanId": "shoppingCartServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getCartDTO",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="getCartDTO" type="ShoppingCartDTO">
  | Argument  | Typ      | Beschreibung                |
  | --------- | -------- | --------------------------- |
  | `buyerId` | `String` | Übergeben über `args[0].0`. |

  ### getCartDTO

  ```json theme={null}
  {
    "beanId": "shoppingCartServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getCartDTO",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="addCommerceItem" type="ShoppingCartDTO">
  | Argument      | Typ      | Beschreibung                |
  | ------------- | -------- | --------------------------- |
  | `sellerSkuId` | `String` | Übergeben über `args[0].0`. |

  ### addCommerceItem

  ```json theme={null}
  {
    "beanId": "shoppingCartServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "addCommerceItem",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="addCommerceItems" type="ShoppingCartDTO">
  | Argument | Typ                             | Beschreibung                |
  | -------- | ------------------------------- | --------------------------- |
  | `data`   | `LinkedHashMap<String, Object>` | Übergeben über `args[0].0`. |

  ### addCommerceItems

  Beispiel für das JSON-Anfrageobjekt:

  ```json theme={null}
  {
      "items":  null
  }
  ```

  Request:

  ```json theme={null}
  {
    "beanId": "shoppingCartServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "addCommerceItems",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="addCommerceItem" type="ShoppingCartDTO">
  | Argument | Typ                             | Beschreibung                |
  | -------- | ------------------------------- | --------------------------- |
  | `data`   | `LinkedHashMap<String, Object>` | Übergeben über `args[0].0`. |

  ### addCommerceItem

  ```json theme={null}
  {
    "beanId": "shoppingCartServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "addCommerceItem",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removeCommerceItem" type="ShoppingCartDTO">
  | Argument | Typ      | Beschreibung                |
  | -------- | -------- | --------------------------- |
  | `itemId` | `String` | Übergeben über `args[0].0`. |

  ### removeCommerceItem

  ```json theme={null}
  {
    "beanId": "shoppingCartServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeCommerceItem",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="clearCart" type="void">
  | Argument | Typ | Beschreibung                              |
  | -------- | --- | ----------------------------------------- |
  | —        | —   | Diese Methode akzeptiert keine Argumente. |

  ### clearCart

  ```json theme={null}
  {
    "beanId": "shoppingCartServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "clearCart",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="decreaseQuantity" type="ShoppingCartDTO">
  | Argument | Typ      | Beschreibung                |
  | -------- | -------- | --------------------------- |
  | `itemId` | `String` | Übergeben über `args[0].0`. |

  ### decreaseQuantity

  ```json theme={null}
  {
    "beanId": "shoppingCartServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "decreaseQuantity",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="updateQuantity" type="ShoppingCartDTO">
  | Argument   | Typ      | Beschreibung                |
  | ---------- | -------- | --------------------------- |
  | `itemId`   | `String` | Übergeben über `args[0].0`. |
  | `quantity` | `String` | Übergeben über `args[1].1`. |

  ### updateQuantity

  ```json theme={null}
  {
    "beanId": "shoppingCartServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "updateQuantity",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="increaseQuantity" type="ShoppingCartDTO">
  | Argument | Typ      | Beschreibung                |
  | -------- | -------- | --------------------------- |
  | `itemId` | `String` | Übergeben über `args[0].0`. |

  ### increaseQuantity

  ```json theme={null}
  {
    "beanId": "shoppingCartServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "increaseQuantity",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="canAddItem" type="boolean">
  | Argument      | Typ      | Beschreibung                |
  | ------------- | -------- | --------------------------- |
  | `sellerSkuId` | `String` | Übergeben über `args[0].0`. |

  ### canAddItem

  ```json theme={null}
  {
    "beanId": "shoppingCartServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "canAddItem",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>
