Skip to content

Commit

Permalink
chore: package api update
Browse files Browse the repository at this point in the history
  • Loading branch information
mkucmus committed Mar 10, 2022
1 parent 0b56fbc commit 79be777
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 7 deletions.
6 changes: 3 additions & 3 deletions api/composables.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,7 @@ export interface IUseUser {
error: ComputedRef<any>;
// (undocumented)
errors: UnwrapRef<{
login: ShopwareError[];
register: ShopwareError[];
updateEmail: ShopwareError[];
[errorAlias: string]: ShopwareError[];
}>;
// (undocumented)
isCustomerSession: ComputedRef<boolean>;
Expand Down Expand Up @@ -560,6 +558,8 @@ export interface IUseUser {
// (undocumented)
salutation: Ref<Salutation | null>;
// (undocumented)
setDefaultPaymentMethod: (paymentMethodId: string) => Promise<void>;
// (undocumented)
updateEmail: (updateEmailData: CustomerUpdateEmailParam) => Promise<boolean>;
// (undocumented)
updatePersonalInfo: (personals: CustomerUpdateProfileParam) => Promise<boolean>;
Expand Down
8 changes: 8 additions & 0 deletions api/shopware-6-client.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ export const getCustomerUpdateEmailEndpoint: () => string;
// @beta (undocumented)
export const getCustomerUpdatePasswordEndpoint: () => string;

// @public (undocumented)
export const getCustomerUpdatePaymentMethodEndpoint: (paymentMethodId: string) => string;

// @beta (undocumented)
export const getGetWishlistProductsEndpoint: () => string;

Expand Down Expand Up @@ -545,6 +548,11 @@ export function setCurrentShippingMethod(newShippingMethodId: string, contextIns
// @public
export function setDefaultCustomerBillingAddress(addressId: string, contextInstance?: ShopwareApiInstance): Promise<string>;

// @public
export function setDefaultCustomerPaymentMethod(paymentMethodId: string, contextInstance?: ShopwareApiInstance): Promise<{
success: boolean;
}>;

// @public
export function setDefaultCustomerShippingAddress(addressId: string, contextInstance?: ShopwareApiInstance): Promise<string>;

Expand Down
4 changes: 1 addition & 3 deletions docs/landing/resources/api/composables.iuseuser.errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

```typescript
errors: UnwrapRef<{
login: ShopwareError[];
register: ShopwareError[];
updateEmail: ShopwareError[];
[errorAlias: string]: ShopwareError[];
}>;
```
3 changes: 2 additions & 1 deletion docs/landing/resources/api/composables.iuseuser.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface IUseUser
| --- | --- | --- |
| [country](./composables.iuseuser.country.md) | Ref&lt;Country \| null&gt; | <b><i>(BETA)</i></b> |
| [error](./composables.iuseuser.error.md) | ComputedRef&lt;any&gt; | <b><i>(BETA)</i></b> |
| [errors](./composables.iuseuser.errors.md) | UnwrapRef&lt;{ login: ShopwareError\[\]; register: ShopwareError\[\]; updateEmail: ShopwareError\[\]; }&gt; | <b><i>(BETA)</i></b> |
| [errors](./composables.iuseuser.errors.md) | UnwrapRef&lt;{ \[errorAlias: string\]: ShopwareError\[\]; }&gt; | <b><i>(BETA)</i></b> |
| [isCustomerSession](./composables.iuseuser.iscustomersession.md) | ComputedRef&lt;boolean&gt; | <b><i>(BETA)</i></b> |
| [isGuestSession](./composables.iuseuser.isguestsession.md) | ComputedRef&lt;boolean&gt; | <b><i>(BETA)</i></b> |
| [isLoggedIn](./composables.iuseuser.isloggedin.md) | ComputedRef&lt;boolean&gt; | <b><i>(BETA)</i></b> |
Expand All @@ -36,6 +36,7 @@ export interface IUseUser
| [refreshUser](./composables.iuseuser.refreshuser.md) | () =&gt; Promise&lt;void&gt; | <b><i>(BETA)</i></b> |
| [register](./composables.iuseuser.register.md) | ({}: CustomerRegistrationParams) =&gt; Promise&lt;boolean&gt; | <b><i>(BETA)</i></b> |
| [salutation](./composables.iuseuser.salutation.md) | Ref&lt;Salutation \| null&gt; | <b><i>(BETA)</i></b> |
| [setDefaultPaymentMethod](./composables.iuseuser.setdefaultpaymentmethod.md) | (paymentMethodId: string) =&gt; Promise&lt;void&gt; | <b><i>(BETA)</i></b> |
| [updateEmail](./composables.iuseuser.updateemail.md) | (updateEmailData: CustomerUpdateEmailParam) =&gt; Promise&lt;boolean&gt; | <b><i>(BETA)</i></b> |
| [updatePersonalInfo](./composables.iuseuser.updatepersonalinfo.md) | (personals: CustomerUpdateProfileParam) =&gt; Promise&lt;boolean&gt; | <b><i>(BETA)</i></b> |
| [user](./composables.iuseuser.user.md) | ComputedRef&lt;Partial&lt;Customer&gt; \| null&gt; | <b><i>(BETA)</i></b> |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@shopware-pwa/composables](./composables.md) &gt; [IUseUser](./composables.iuseuser.md) &gt; [setDefaultPaymentMethod](./composables.iuseuser.setdefaultpaymentmethod.md)

## IUseUser.setDefaultPaymentMethod property

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
<b>Signature:</b>

```typescript
setDefaultPaymentMethod: (paymentMethodId: string) => Promise<void>;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@shopware-pwa/shopware-6-client](./shopware-6-client.md) &gt; [getCustomerUpdatePaymentMethodEndpoint](./shopware-6-client.getcustomerupdatepaymentmethodendpoint.md)

## getCustomerUpdatePaymentMethodEndpoint variable


<b>Signature:</b>

```typescript
getCustomerUpdatePaymentMethodEndpoint: (paymentMethodId: string) => string
```
2 changes: 2 additions & 0 deletions docs/landing/resources/api/shopware-6-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
| [setCurrentShippingAddress(shippingAddressId, contextInstance)](./shopware-6-client.setcurrentshippingaddress.md) | Set the current session's shipping address to correspoding to id |
| [setCurrentShippingMethod(newShippingMethodId, contextInstance)](./shopware-6-client.setcurrentshippingmethod.md) | |
| [setDefaultCustomerBillingAddress(addressId, contextInstance)](./shopware-6-client.setdefaultcustomerbillingaddress.md) | Set address as default |
| [setDefaultCustomerPaymentMethod(paymentMethodId, contextInstance)](./shopware-6-client.setdefaultcustomerpaymentmethod.md) | Set payment method under provided ID as default |
| [setDefaultCustomerShippingAddress(addressId, contextInstance)](./shopware-6-client.setdefaultcustomershippingaddress.md) | Set address as default |
| [updateCustomerAddress(params, contextInstance)](./shopware-6-client.updatecustomeraddress.md) | Update an address for specific ID |
| [updateEmail(params, contextInstance)](./shopware-6-client.updateemail.md) | Update a customer's email |
Expand Down Expand Up @@ -130,6 +131,7 @@
| [getCustomerResetPasswordEndpoint](./shopware-6-client.getcustomerresetpasswordendpoint.md) | <b><i>(BETA)</i></b> |
| [getCustomerUpdateEmailEndpoint](./shopware-6-client.getcustomerupdateemailendpoint.md) | <b><i>(BETA)</i></b> |
| [getCustomerUpdatePasswordEndpoint](./shopware-6-client.getcustomerupdatepasswordendpoint.md) | <b><i>(BETA)</i></b> |
| [getCustomerUpdatePaymentMethodEndpoint](./shopware-6-client.getcustomerupdatepaymentmethodendpoint.md) | |
| [getGetWishlistProductsEndpoint](./shopware-6-client.getgetwishlistproductsendpoint.md) | <b><i>(BETA)</i></b> |
| [getMergeWishlistProductsEndpoint](./shopware-6-client.getmergewishlistproductsendpoint.md) | <b><i>(BETA)</i></b> |
| [getNewsletterSubscribeEndpoint](./shopware-6-client.getnewslettersubscribeendpoint.md) | <b><i>(BETA)</i></b> |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@shopware-pwa/shopware-6-client](./shopware-6-client.md) &gt; [setDefaultCustomerPaymentMethod](./shopware-6-client.setdefaultcustomerpaymentmethod.md)

## setDefaultCustomerPaymentMethod() function

Set payment method under provided ID as default

<b>Signature:</b>

```typescript
export declare function setDefaultCustomerPaymentMethod(paymentMethodId: string, contextInstance?: ShopwareApiInstance): Promise<{
success: boolean;
}>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| paymentMethodId | string | |
| contextInstance | [ShopwareApiInstance](./shopware-6-client.shopwareapiinstance.md) | |

<b>Returns:</b>

Promise&lt;{ success: boolean; }&gt;

## Exceptions

ClientApiError

0 comments on commit 79be777

Please sign in to comment.