@devite/shopware-client 1.5.8 → 1.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -13582,9 +13582,13 @@ class SystemClient extends Client {
13582
13582
  * @throws {ShopwareError | import('ofetch').FetchError} if the request failed
13583
13583
  */
13584
13584
  async getShippingMethods(request = {}, onlyAvailable = false) {
13585
- const response = await this.post(`/shipping-method?onlyAvailable=${onlyAvailable ? 1 : 0}`, {
13586
- body: new JsonPayload(request)
13587
- });
13585
+ const response = await this.post(
13586
+ `/shipping-method`,
13587
+ this.client.withContextToken({
13588
+ query: { onlyAvailable: onlyAvailable ? 1 : 0 },
13589
+ body: new JsonPayload(request)
13590
+ })
13591
+ );
13588
13592
  if (response.statusCode === 200)
13589
13593
  return response.body.data;
13590
13594
  throw new ShopwareError("Failed to fetch shipping methods", response);
@@ -13593,9 +13597,13 @@ class SystemClient extends Client {
13593
13597
  * @throws {ShopwareError | import('ofetch').FetchError} if the request failed
13594
13598
  */
13595
13599
  async getPaymentMethods(request = {}, onlyAvailable = false) {
13596
- const response = await this.post(`/payment-method?onlyAvailable=${onlyAvailable ? 1 : 0}`, {
13597
- body: new JsonPayload(request)
13598
- });
13600
+ const response = await this.post(
13601
+ `/payment-method`,
13602
+ this.client.withContextToken({
13603
+ query: { onlyAvailable: onlyAvailable ? 1 : 0 },
13604
+ body: new JsonPayload(request)
13605
+ })
13606
+ );
13599
13607
  if (response.statusCode === 200)
13600
13608
  return response.body.data;
13601
13609
  throw new ShopwareError("Failed to fetch payment methods", response);
package/dist/index.mjs CHANGED
@@ -13580,9 +13580,13 @@ class SystemClient extends Client {
13580
13580
  * @throws {ShopwareError | import('ofetch').FetchError} if the request failed
13581
13581
  */
13582
13582
  async getShippingMethods(request = {}, onlyAvailable = false) {
13583
- const response = await this.post(`/shipping-method?onlyAvailable=${onlyAvailable ? 1 : 0}`, {
13584
- body: new JsonPayload(request)
13585
- });
13583
+ const response = await this.post(
13584
+ `/shipping-method`,
13585
+ this.client.withContextToken({
13586
+ query: { onlyAvailable: onlyAvailable ? 1 : 0 },
13587
+ body: new JsonPayload(request)
13588
+ })
13589
+ );
13586
13590
  if (response.statusCode === 200)
13587
13591
  return response.body.data;
13588
13592
  throw new ShopwareError("Failed to fetch shipping methods", response);
@@ -13591,9 +13595,13 @@ class SystemClient extends Client {
13591
13595
  * @throws {ShopwareError | import('ofetch').FetchError} if the request failed
13592
13596
  */
13593
13597
  async getPaymentMethods(request = {}, onlyAvailable = false) {
13594
- const response = await this.post(`/payment-method?onlyAvailable=${onlyAvailable ? 1 : 0}`, {
13595
- body: new JsonPayload(request)
13596
- });
13598
+ const response = await this.post(
13599
+ `/payment-method`,
13600
+ this.client.withContextToken({
13601
+ query: { onlyAvailable: onlyAvailable ? 1 : 0 },
13602
+ body: new JsonPayload(request)
13603
+ })
13604
+ );
13597
13605
  if (response.statusCode === 200)
13598
13606
  return response.body.data;
13599
13607
  throw new ShopwareError("Failed to fetch payment methods", response);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devite/shopware-client",
3
- "version": "1.5.8",
3
+ "version": "1.5.9",
4
4
  "description": "Third party API client for Shopware 6.",
5
5
  "repository": "devite-io/shopware-client",
6
6
  "license": "MIT",